Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 10829225: Browser Plugin: Add HTML5-like postMessage support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Verified to work with nasko@'s disabled frame tree updates Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..fe0363832656ce07395a891ba232b890a9657dc8 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,23 @@ 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_; }
+
+ 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 +129,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 +168,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 +197,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);
};

Powered by Google App Engine
This is Rietveld 408576698