Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime.h
index 619e507..aed09ca 100644 (file)
@@ -55,8 +55,6 @@ class Runtime : public content::WebContentsDelegate,
 
   void SetObserver(Observer* observer) { observer_ = observer; }
 
-  // Create a new Runtime instance with the given browsing context and URL.
-  static Runtime* Create(RuntimeContext*, const GURL&, Observer* = NULL);
   // Create a new Runtime instance which binds to a default app window.
   static Runtime* CreateWithDefaultWindow(RuntimeContext*,
                                           const GURL&, Observer* = NULL);
@@ -76,7 +74,9 @@ class Runtime : public content::WebContentsDelegate,
   RuntimeContext* runtime_context() const { return runtime_context_; }
   gfx::Image app_icon() const { return app_icon_; }
 
-  static void SetGlobalObserverForTesting(Observer* observer);
+#if defined(OS_TIZEN_MOBILE)
+  void CloseRootWindow();
+#endif
 
  protected:
   Runtime(content::WebContents* web_contents, Observer* observer);
@@ -97,7 +97,7 @@ class Runtime : public content::WebContentsDelegate,
   virtual void CloseContents(content::WebContents* source) OVERRIDE;
   virtual void WebContentsCreated(content::WebContents* source_contents,
                                   int64 source_frame_id,
-                                  const string16& frame_name,
+                                  const base::string16& frame_name,
                                   const GURL& target_url,
                                   content::WebContents* new_contents) OVERRIDE;
   virtual void DidNavigateMainFramePostCommit(
@@ -116,7 +116,8 @@ class Runtime : public content::WebContentsDelegate,
       const content::NativeWebKeyboardEvent& event) OVERRIDE;
   virtual content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
-      SkColor initial_color) OVERRIDE;
+      SkColor initial_color,
+      const std::vector<content::ColorSuggestion>& suggestions) OVERRIDE;
   virtual void RunFileChooser(
       content::WebContents* web_contents,
       const content::FileChooserParams& params) OVERRIDE;
@@ -148,6 +149,15 @@ class Runtime : public content::WebContentsDelegate,
   // NativeAppWindowDelegate implementation.
   virtual void OnWindowDestroyed() OVERRIDE;
 
+  void ApplyWindowDefaultParams(NativeAppWindow::CreateParams* params);
+  void ApplyFullScreenParam(NativeAppWindow::CreateParams* params);
+
+#if defined(OS_TIZEN_MOBILE)
+  void ApplyRootWindowParams(NativeAppWindow::CreateParams* params);
+  void SetRootWindow(NativeAppWindow* window);
+  void InitRootWindow();
+#endif
+
   // The browsing context.
   xwalk::RuntimeContext* runtime_context_;
 
@@ -159,6 +169,10 @@ class Runtime : public content::WebContentsDelegate,
 
   NativeAppWindow* window_;
 
+#if defined(OS_TIZEN_MOBILE)
+  NativeAppWindow* root_window_;
+#endif
+
   gfx::Image app_icon_;
 
   base::WeakPtrFactory<Runtime> weak_ptr_factory_;