Index: extensions/browser/guest_view/guest_view_base.h |
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h |
index c3f8f766f0f9ad02cdbf2348c784c02f1725a7a7..19c5416659a77ddcaf156483c973e32730110977 100644 |
--- a/extensions/browser/guest_view/guest_view_base.h |
+++ b/extensions/browser/guest_view/guest_view_base.h |
@@ -11,7 +11,7 @@ |
#include "base/values.h" |
#include "components/ui/zoom/zoom_observer.h" |
#include "content/public/browser/browser_plugin_guest_delegate.h" |
-#include "content/public/browser/guest_sizer.h" |
+#include "content/public/browser/guest_proxy_host.h" |
#include "content/public/browser/render_process_host_observer.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_delegate.h" |
@@ -198,6 +198,9 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
void InitWithWebContents(const base::DictionaryValue& create_params, |
content::WebContents* guest_web_contents); |
+ void LoadURLWithParams( |
+ const content::NavigationController::LoadURLParams& load_params); |
+ |
bool IsViewType(const char* const view_type) const { |
return !strcmp(GetViewType(), view_type); |
} |
@@ -216,6 +219,10 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
return owner_web_contents_; |
} |
+ content::GuestProxyHost* proxy_host() const { |
+ return guest_proxy_host_; |
+ } |
+ |
// Returns the parameters associated with the element hosting this GuestView |
// passed in from JavaScript. |
base::DictionaryValue* attach_params() const { return attach_params_.get(); } |
@@ -257,6 +264,9 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// Whether the guest view is inside a plugin document. |
bool is_full_page_plugin() { return is_full_page_plugin_; } |
+ // Returns the routing ID of the guest proxy in the owner's renderer process. |
Charlie Reis
2015/03/09 21:25:22
Mention this is only valid after either attach or
Fady Samuel
2015/03/09 23:02:42
Done.
|
+ int proxy_routing_id() const { return guest_proxy_routing_id_; } |
+ |
// Destroy this guest. |
void Destroy(); |
@@ -271,8 +281,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
void DidDetach() final; |
content::WebContents* GetOwnerWebContents() const final; |
void GuestSizeChanged(const gfx::Size& new_size) final; |
- void RegisterDestructionCallback(const DestructionCallback& callback) final; |
- void SetGuestSizer(content::GuestSizer* guest_sizer) final; |
+ void SetGuestProxyHost(content::GuestProxyHost* guest_proxy_host) final; |
void WillAttach(content::WebContents* embedder_web_contents, |
int browser_plugin_instance_id, |
bool is_full_page_plugin) final; |
@@ -396,8 +405,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// The opener guest view. |
base::WeakPtr<GuestViewBase> opener_; |
- DestructionCallback destruction_callback_; |
- |
// The parameters associated with the element hosting this GuestView that |
// are passed in from JavaScript. This will typically be the view instance ID, |
// and element-specific parameters. These parameters are passed along to new |
@@ -416,8 +423,8 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// element may not match the size of the guest. |
gfx::Size guest_size_; |
- // A pointer to the guest_sizer. |
- content::GuestSizer* guest_sizer_; |
+ // A pointer to the guest_proxy_host. |
+ content::GuestProxyHost* guest_proxy_host_; |
// Indicates whether autosize mode is enabled or not. |
bool auto_size_enabled_; |
@@ -434,6 +441,9 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// Whether the guest view is inside a plugin document. |
bool is_full_page_plugin_; |
+ // The routing ID of the proxy to the guest in the owner's renderer process. |
+ int guest_proxy_routing_id_; |
Charlie Reis
2015/03/09 18:52:59
Why do you need to cache this? It seems like we c
Charlie Reis
2015/03/09 21:25:22
Disregard. Only makes sense in Option 2.
Fady Samuel
2015/03/09 23:02:42
Done.
Fady Samuel
2015/03/09 23:02:42
Done.
|
+ |
// This is used to ensure pending tasks will not fire after this object is |
// destroyed. |
base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |