Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / browser / browser_plugin / browser_plugin_guest.h
index 501edbc..870783c 100644 (file)
@@ -67,6 +67,10 @@ namespace gfx {
 class Range;
 }
 
+namespace gpu {
+struct Mailbox;
+}
+
 namespace content {
 
 class BrowserPluginHostFactory;
@@ -91,8 +95,7 @@ struct MediaStreamRequest;
 class CONTENT_EXPORT BrowserPluginGuest
     : public JavaScriptDialogManager,
       public WebContentsDelegate,
-      public WebContentsObserver,
-      public base::SupportsWeakPtr<BrowserPluginGuest> {
+      public WebContentsObserver {
  public:
   typedef base::Callback<void(bool)> GeolocationCallback;
   virtual ~BrowserPluginGuest();
@@ -116,6 +119,9 @@ class CONTENT_EXPORT BrowserPluginGuest
       WebContentsImpl* web_contents,
       BrowserPluginGuest* opener);
 
+  // Returns a WeakPtr to this BrowserPluginGuest.
+  base::WeakPtr<BrowserPluginGuest> AsWeakPtr();
+
   // Called when the embedder WebContents is destroyed to give the
   // BrowserPluginGuest an opportunity to clean up after itself.
   void EmbedderDestroyed();
@@ -218,6 +224,9 @@ class CONTENT_EXPORT BrowserPluginGuest
       WebContents* web_contents,
       const MediaStreamRequest& request,
       const MediaResponseCallback& callback) OVERRIDE;
+  virtual bool PreHandleGestureEvent(
+      content::WebContents* source,
+      const blink::WebGestureEvent& event) OVERRIDE;
 
   // JavaScriptDialogManager implementation.
   virtual void RunJavaScriptDialog(
@@ -281,7 +290,7 @@ class CONTENT_EXPORT BrowserPluginGuest
   // BrowserPluginGuest is already destroyed.
   static void AcknowledgeBufferPresent(int route_id,
                                        int gpu_host_id,
-                                       const std::string& mailbox_name,
+                                       const gpu::Mailbox& mailbox,
                                        uint32 sync_point);
 
   // Returns whether BrowserPluginGuest is interested in receiving the given
@@ -311,6 +320,8 @@ class CONTENT_EXPORT BrowserPluginGuest
     BrowserPluginGuest::factory_ = factory;
   }
 
+  void SetZoom(double zoom_factor);
+
  private:
   class EmbedderWebContentsObserver;
   friend class TestBrowserPluginGuest;
@@ -587,6 +598,11 @@ class CONTENT_EXPORT BrowserPluginGuest
 
   bool is_in_destruction_;
 
+  // Text input type states.
+  ui::TextInputType last_text_input_type_;
+  ui::TextInputMode last_input_mode_;
+  bool last_can_compose_inline_;
+
   // This is a queue of messages that are destined to be sent to the embedder
   // once the guest is attached to a particular embedder.
   std::queue<IPC::Message*> pending_messages_;