Changed a string to a variable 84/134184/2
authorjaekuk, lee <juku1999@samsung.com>
Thu, 15 Jun 2017 06:41:28 +0000 (15:41 +0900)
committerjaekuk lee <juku1999@samsung.com>
Thu, 15 Jun 2017 06:42:23 +0000 (06:42 +0000)
"fullscreen" => kViewmodeTypeFullscreen
"windowed"   => kViewmodeTypeWindowed

Change-Id: I11fb960c02fcff0616eeb435668f08eed5236c59
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
runtime/browser/web_application.cc

index cb64d94..4815923 100755 (executable)
@@ -143,6 +143,9 @@ const char* kDefaultCSPRule =
 const char* kResWgtPath = "res/wgt/";
 const char* kAppControlMain = "http://tizen.org/appcontrol/operation/main";
 
+const std::string kViewmodeTypeFullscreen = "fullscreen";
+const std::string kViewmodeTypeWindowed = "windowed";
+
 // Looking for added privilege by Application developer in config.xml.
 bool FindPrivilegeFromConfig(common::ApplicationData* app_data,
                    const std::string& privilege) {
@@ -445,7 +448,7 @@ bool WebApplication::Initialize() {
   }
 
   if (app_data_->widget_info() != NULL &&
-        app_data_->widget_info()->view_modes() == "fullscreen") {
+        app_data_->widget_info()->view_modes() == kViewmodeTypeFullscreen) {
       window_->SetCurrentViewModeFullScreen(true);
       window_->FullScreen(true);
   }
@@ -953,7 +956,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) {
     if ((app_data_->setting_info() != NULL &&
          app_data_->setting_info()->backbutton_presence()) ||
         (app_data_->widget_info() != NULL &&
-         app_data_->widget_info()->view_modes() == "windowed")) {
+         app_data_->widget_info()->view_modes() == kViewmodeTypeWindowed)) {
       if (!view->Backward()) {
         LOGGER(DEBUG) << "Terminate";
         Terminate();