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 bfef213c7c8b1eb69706a526174cb929ac459d5d..f4035444c91db0d8119fa2cfd67f2c82f6c68120 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.h |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.h |
| @@ -41,6 +41,7 @@ |
| class TransportDIB; |
| struct ViewHostMsg_UpdateRect_Params; |
| +struct ViewMsg_PostMessage_Params; |
| namespace WebKit { |
| class WebInputEvent; |
| @@ -81,6 +82,22 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
| embedder_render_process_host_ = render_process_host; |
| } |
| + // Returns the identifier that uniquely identifies a browser plugin guest |
| + // within an embedder. |
| + int instance_id() const { return instance_id_; } |
|
nasko
2012/10/02 17:52:31
nit: I'll add an empty line after this, since it i
Fady Samuel
2012/10/02 22:04:08
Done.
|
| + void set_swapped_out_embedder_routing_id(int routing_id) { |
| + swapped_out_embedder_routing_id_ = routing_id; |
| + } |
| + int swapped_out_embedder_routing_id() const { |
| + return swapped_out_embedder_routing_id_; |
| + } |
| + void set_swapped_out_guest_routing_id(int routing_id) { |
| + swapped_out_guest_routing_id_ = routing_id; |
| + } |
| + int swapped_out_guest_routing_id() const { |
| + return swapped_out_guest_routing_id_; |
| + } |
| + |
| // WebContentsObserver implementation. |
| virtual void DidCommitProvisionalLoadForFrame( |
| int64 frame_id, |
| @@ -111,6 +128,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
| // Handles input event acks so they are sent to browser plugin host (via |
| // embedder) instead of default view/widget host. |
| void HandleInputEventAck(RenderViewHost* render_view_host, bool handled); |
| + // Handles postMessages sent from the guest to the embedder. |
| + void RouteMessageEvent(const ViewMsg_PostMessage_Params& params); |
| // The guest needs to notify the plugin in the embedder to start (or stop) |
| // accepting touch events. |
| @@ -148,9 +167,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
| RenderProcessHost* embedder_render_process_host() { |
| return embedder_render_process_host_; |
| } |
| - // Returns the identifier that uniquely identifies a browser plugin guest |
| - // within an embedder. |
| - int instance_id() const { return instance_id_; } |
| TransportDIB* damage_buffer() const { return damage_buffer_.get(); } |
| const gfx::Size& damage_view_size() const { return damage_view_size_; } |
| float damage_buffer_scale_factor() const { |
| @@ -180,6 +196,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
| IDMap<RenderViewHost> pending_updates_; |
| int pending_update_counter_; |
| base::TimeDelta guest_hang_timeout_; |
| + int swapped_out_embedder_routing_id_; |
| + int swapped_out_guest_routing_id_; |
| DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| }; |