From: JongHeon Choi Date: Thu, 7 Apr 2016 06:45:40 +0000 (+0900) Subject: Enable back-key on remote URL X-Git-Tag: accepted/tizen/common/20160428.144556~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d924ae9166b2653e4ec16464d7d8554abcd0af7d;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Enable back-key on remote URL --- diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index e9b211d..b006d8c 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -96,6 +96,7 @@ const char* kLocationPrivilege = "http://tizen.org/privilege/location"; const char* kStoragePrivilege = "http://tizen.org/privilege/unlimitedstorage"; const char* kUsermediaPrivilege = "http://tizen.org/privilege/mediacapture"; const char* kNotiIconFile = "noti_icon.png"; +const char* kFileScheme = "file://"; const char* kVisibilitySuspendFeature = "visibility,suspend"; const char* kMediastreamRecordFeature = "mediastream,record"; @@ -603,6 +604,13 @@ void WebApplication::OnOrientationLock( } void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { + // NOTE: This code is added to enable back-key on remote URL + if (!common::utils::StartsWith(view->GetUrl(), kFileScheme)) { + LOGGER(DEBUG) << "Back to previous page for remote URL"; + view->Backward(); + return; + } + bool enabled = app_data_->setting_info() != NULL ? app_data_->setting_info()->hwkey_enabled() : true;