Refactor runtime object 32/185132/3
authorsurya.kumar7 <surya.kumar7@samsung.com>
Thu, 26 Jul 2018 07:12:13 +0000 (12:42 +0530)
committerjaekuk lee <juku1999@samsung.com>
Thu, 26 Jul 2018 23:32:22 +0000 (23:32 +0000)
Since runtime object is not created during prelaunch, removed
functions which handled such scenarios

Change-Id: I3ab42b4b5b7299c8a700ee670c7c0ca3a6ab68be
Signed-off-by: surya.kumar7 <surya.kumar7@samsung.com>
atom/app/runtime.h
atom/app/ui_runtime.cc
atom/app/ui_runtime.h
atom/app/watch_runtime.cc
atom/app/watch_runtime.h
tizen/src/wrt_main.cc

index c5552fb9459e2b8ed27b2ee6d1adc480c540fb9a..b5f956a092cc6a64420c78a7b8adb6053b183999 100644 (file)
@@ -32,8 +32,6 @@ class Runtime {
 
   virtual int Exec() = 0;
 
-  virtual void SetParam(content::ContentMainParams *params) = 0;
-
   static std::unique_ptr<Runtime> MakeRuntime(content::ContentMainParams *params);
 };
 
index c078f6513f3704865e6e4f1aecc8b96cdc1bc128..0b5c77ea90fec232b7f0a4199179ec3c9ef5be55 100644 (file)
@@ -26,7 +26,6 @@
 #include "atom/common/atom_command_line.h"
 #include "base/logging.h"
 #include "content/public/app/content_main.h"
-#include "gin/v8_initializer.h"
 #include "tizen/common/app_control.h"
 #include "tizen/common/app_db.h"
 #include "tizen/common/application_data.h"
@@ -42,13 +41,6 @@ UiRuntime::UiRuntime(content::ContentMainParams *params)
 UiRuntime::~UiRuntime() {
 }
 
-void UiRuntime::SetParam(content::ContentMainParams *params) {
-  if (_params)
-    LOG(ERROR) << "Use SetParam only when params is null";
-  else
-    _params = params;
-}
-
 bool UiRuntime::OnCreate() {
   auto appdata = common::ApplicationDataManager::GetCurrentAppData();
   atom::Browser::Get()->Initialize();
index f32086b94edc03ad4708b0928d189d2267103b8d..f39dc4e9e353d3447dddc3d06d40b12b5aa2e36e 100644 (file)
@@ -29,8 +29,7 @@ class UiRuntime : public Runtime {
   UiRuntime(content::ContentMainParams *params);
   virtual ~UiRuntime();
 
-  virtual int Exec();
-  virtual void SetParam(content::ContentMainParams *params);
+  virtual int Exec() override;
 
  protected:
   virtual bool OnCreate();
index 58b42040f5625d84c0ff00ce8edf169c7d637467..793356c0ddc24c0f3ee16db7aaa07926378aa0a6 100644 (file)
@@ -43,13 +43,6 @@ WatchRuntime::WatchRuntime(content::ContentMainParams *params)
 WatchRuntime::~WatchRuntime() {
 }
 
-void WatchRuntime::SetParam(content::ContentMainParams *params) {
-  if (_params)
-    LOG(ERROR) << "Use SetParam only when params is null";
-  else
-    _params = params;
-}
-
 bool WatchRuntime::OnCreate() {
   auto appdata = common::ApplicationDataManager::GetCurrentAppData();
   if (appdata->splash_screen_info()) {
index 43636bceac761ed542eac9959a88d7d69c3fcb77..23cdfbd45a76716f7236fd46775cdefb1211c5a6 100644 (file)
@@ -30,8 +30,7 @@ class WatchRuntime : public Runtime {
   WatchRuntime(content::ContentMainParams *params);
   virtual ~WatchRuntime();
 
-  virtual int Exec();
-  virtual void SetParam(content::ContentMainParams *params);
+  virtual int Exec() override;
 
  protected:
   virtual bool OnCreate();
index f449862f92862fdc560393ea9ad289bc4dc63f72..32de2425a3b417c46822a7f43ba4366451f04764 100644 (file)
@@ -145,9 +145,6 @@ int main(int argc, char* argv[]) {
   if (hasTizenPackageID(argc,argv)) { // TODO: Check to be removed later
     elm_init(argc, argv);
     runtime_ = runtime::Runtime::MakeRuntime(&params);
-    if (g_initialized_) {
-      runtime_->SetParam(&params);
-    }
     return runtime_->Exec();
   }
 #endif