Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / views / controls / webview / webview.h
index df0c61c..850b2ba 100644 (file)
@@ -54,10 +54,6 @@ class WEBVIEW_EXPORT WebView : public View,
   // widget or restore the normal WebContentsView.
   void SetEmbedFullscreenWidgetMode(bool mode);
 
-  content::WebContents* web_contents() const {
-    return content::WebContentsObserver::web_contents();
-  }
-
   content::BrowserContext* browser_context() { return browser_context_; }
 
   // Loads the initial URL to display in the attached WebContents. Creates the
@@ -94,41 +90,53 @@ class WEBVIEW_EXPORT WebView : public View,
 
   // Overridden from View:
   virtual const char* GetClassName() const OVERRIDE;
+  virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
 
  protected:
+  // Swaps the owned WebContents |wc_owner_| with |new_web_contents|. Returns
+  // the previously owned WebContents.
+  scoped_ptr<content::WebContents> SwapWebContents(
+      scoped_ptr<content::WebContents> new_web_contents);
+
   // Overridden from View:
   virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
   virtual void ViewHierarchyChanged(
       const ViewHierarchyChangedDetails& details) OVERRIDE;
   virtual bool SkipDefaultKeyEventProcessing(
       const ui::KeyEvent& event) OVERRIDE;
-  virtual bool IsFocusable() const OVERRIDE;
   virtual void OnFocus() OVERRIDE;
   virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
   virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
   virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
-  virtual gfx::Size GetPreferredSize() OVERRIDE;
+  virtual gfx::Size GetPreferredSize() const OVERRIDE;
 
   // Overridden from content::WebContentsDelegate:
   virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE;
   virtual bool EmbedsFullscreenWidget() const OVERRIDE;
 
   // Overridden from content::WebContentsObserver:
+  virtual void RenderViewDeleted(
+      content::RenderViewHost* render_view_host) OVERRIDE;
+  virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
   virtual void RenderViewHostChanged(
       content::RenderViewHost* old_host,
       content::RenderViewHost* new_host) OVERRIDE;
   virtual void DidShowFullscreenWidget(int routing_id) OVERRIDE;
   virtual void DidDestroyFullscreenWidget(int routing_id) OVERRIDE;
   virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE;
+  virtual void DidAttachInterstitialPage() OVERRIDE;
+  virtual void DidDetachInterstitialPage() OVERRIDE;
   // Workaround for MSVC++ linker bug/feature that requires
   // instantiation of the inline IPC::Listener methods in all translation units.
   virtual void OnChannelConnected(int32 peer_id) OVERRIDE {}
   virtual void OnChannelError() OVERRIDE {}
+  virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE {}
 
  private:
   void AttachWebContents();
   void DetachWebContents();
   void ReattachForFullscreenChange(bool enter_fullscreen);
+  void NotifyMaybeTextInputClientChanged();
 
   // Create a regular or test web contents (based on whether we're running
   // in a unit test or not).