Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / public / browser / browser_plugin_guest_delegate.h
index 7abd737..2818982 100644 (file)
@@ -8,6 +8,7 @@
 #include "base/callback_forward.h"
 #include "base/process/kill.h"
 #include "content/common/content_export.h"
+#include "content/public/browser/web_contents.h"
 
 namespace base {
 class DictionaryValue;
@@ -19,8 +20,6 @@ class Size;
 
 namespace content {
 
-class WebContents;
-
 // Objects implement this interface to get notified about changes in the guest
 // WebContents and to provide necessary functionality.
 class CONTENT_EXPORT BrowserPluginGuestDelegate {
@@ -32,12 +31,24 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
   virtual void WillAttach(content::WebContents* embedder_web_contents,
                           const base::DictionaryValue& extra_params) {}
 
+  virtual WebContents* CreateNewGuestWindow(
+      const WebContents::CreateParams& create_params);
+
   // Notification that the embedder has completed attachment.
   virtual void DidAttach() {}
 
-  // Notifies that the content size of the guest has changed in autosize mode.
-  virtual void SizeChanged(const gfx::Size& old_size,
-                           const gfx::Size& new_size) {}
+  // Requests the instance ID associated with the delegate.
+  virtual int GetGuestInstanceID() const;
+
+  // Notification that the BrowserPlugin has resized.
+  virtual void ElementSizeChanged(const gfx::Size& old_size,
+                                  const gfx::Size& new_size) {}
+
+  // Notifies that the content size of the guest has changed.
+  // Note: In autosize mode, it si possible that the guest size may not match
+  // the element size.
+  virtual void GuestSizeChanged(const gfx::Size& old_size,
+                                const gfx::Size& new_size) {}
 
   // Asks the delegate if the given guest can lock the pointer.
   // Invoking the |callback| synchronously is OK.