Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_guest.h |
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h |
| index d3cd739c8fdd53dd352281cc44a437821833909d..bec6eeb1509905a8fd2895f144bc1fec4e5be281 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.h |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.h |
| @@ -46,6 +46,7 @@ struct FrameHostMsg_ReclaimCompositorResources_Params; |
| #if defined(OS_MACOSX) |
| struct FrameHostMsg_ShowPopup_Params; |
| #endif |
| +struct FrameMsg_CompositorFrameSwapped_Params; |
| namespace blink { |
| class WebInputEvent; |
| @@ -126,6 +127,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver { |
| // within an embedder. |
| int browser_plugin_instance_id() const { return browser_plugin_instance_id_; } |
| + void Init(); |
| + |
| bool OnMessageReceivedFromEmbedder(const IPC::Message& message); |
| WebContentsImpl* embedder_web_contents() const { |
| @@ -216,9 +219,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver { |
| void WillDestroy(); |
| - void Initialize(int browser_plugin_instance_id, |
| - const BrowserPluginHostMsg_Attach_Params& params, |
| - WebContentsImpl* embedder_web_contents); |
| + void InitInternal(const BrowserPluginHostMsg_Attach_Params& params, |
| + WebContentsImpl* owner_web_contents); |
| bool InAutoSizeBounds(const gfx::Size& size) const; |
| @@ -252,7 +254,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver { |
| void OnLockMouseAck(int instance_id, bool succeeded); |
| // Resizes the guest's web contents. |
| void OnResizeGuest( |
| - int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| + int browser_plugin_instance_id, |
| + const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| void OnSetFocus(int instance_id, bool focused); |
| // Sets the name of the guest so that other guests in the same partition can |
| // access it. |
| @@ -358,6 +361,10 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver { |
| bool is_in_destruction_; |
| + // BrowserPluginGuest::Init can only be called once. This flag allows it to |
| + // exit early if it's already been called. |
| + bool initialized_; |
| + |
| // Text input type states. |
| ui::TextInputType last_text_input_type_; |
| ui::TextInputMode last_input_mode_; |
| @@ -368,6 +375,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver { |
| // WebContents in the embedder's process. |
| int guest_proxy_routing_id_; |
| + scoped_ptr<FrameMsg_CompositorFrameSwapped_Params> pending_frame_; |
|
lazyboy
2014/12/04 16:51:13
Describe why pending frame needs to be stored, i.e
Fady Samuel
2014/12/04 20:54:44
Done.
|
| + |
| // 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::deque<linked_ptr<IPC::Message> > pending_messages_; |