Runtime object creation code cleanup. 99/180799/1
authork2.nagaraju <k2.nagaraju@samsung.com>
Mon, 4 Jun 2018 09:19:15 +0000 (14:49 +0530)
committerk2.nagaraju <k2.nagaraju@samsung.com>
Mon, 4 Jun 2018 09:19:20 +0000 (14:49 +0530)
Change-Id: I6abd9fa5e506099def2ca41143887dbb9f7edccc
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
runtime/browser/runtime.cc

index 8e68210..01af3bf 100644 (file)
@@ -41,24 +41,19 @@ Runtime::~Runtime() {
 
 std::unique_ptr<Runtime> Runtime::MakeRuntime(
     common::ApplicationData* app_data) {
-  if (app_data->app_type() == common::ApplicationData::UI) {
-    return std::unique_ptr<Runtime>(new UiRuntime(app_data));
-  }
 #ifdef IME_FEATURE_SUPPORT
-  else if (TIZEN_FEATURE_web_ime_support &&
-           app_data->app_type() == common::ApplicationData::IME) {
+  if (TIZEN_FEATURE_web_ime_support &&
+      app_data->app_type() == common::ApplicationData::IME) {
     return std::unique_ptr<Runtime>(new ImeRuntime(app_data));
   }
 #endif  // IME_FEATURE_SUPPORT
 #ifdef WATCH_FACE_FEATURE_SUPPORT
-  else if (TIZEN_FEATURE_watch_face_support &&
-           app_data->app_type() == common::ApplicationData::WATCH) {
+  if (TIZEN_FEATURE_watch_face_support &&
+      app_data->app_type() == common::ApplicationData::WATCH) {
     return std::unique_ptr<Runtime>(new WatchRuntime(app_data));
   }
 #endif  // WATCH_FACE_FEATURE_SUPPORT
-  else {
-    return std::unique_ptr<Runtime>(new UiRuntime(app_data));
-  }
+  return std::unique_ptr<Runtime>(new UiRuntime(app_data));
 }
 
 void Runtime::ProcessClosingPage(WebApplication* application) {