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

Unified Diff: content/renderer/browser_plugin/browser_plugin.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/renderer/browser_plugin/browser_plugin.h
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index 2d3d45116a5eb54545a6d05aa8dc90ad9f738441..9dbed8d71f9d80115552e9b0ae04524a79e5a2de 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -36,6 +36,8 @@ class CONTENT_EXPORT BrowserPlugin :
// Set the src attribute value of the BrowserPlugin instance and reset
// the guest_crashed_ flag.
void SetSrcAttribute(const std::string& src);
+ // Get the guest's DOMWindow proxy.
+ NPObject* GetContentWindow() const;
// Returns Chrome's process ID for the current guest.
int process_id() const { return process_id_; }
// The partition identifier string is stored as UTF-8.
@@ -57,6 +59,14 @@ class CONTENT_EXPORT BrowserPlugin :
// Tells the BrowserPlugin to advance the focus to the next (or previous)
// element.
void AdvanceFocus(bool reverse);
+ // Inform the BrowserPlugin of a message posted from its guest.
+ void ReceiveMessage(int source_routing_id,
+ const string16& source_origin,
+ int source_frame_id,
+ const string16& data);
+ // Inform the BrowserPlugin that the guest's contentWindow is ready,
+ // and provide it with a routing ID to grab it.
+ void GuestContentWindowReady(int guest_routing_id);
// Informs the BrowserPlugin that the guest has started/stopped accepting
// touch events.
@@ -181,6 +191,7 @@ class CONTENT_EXPORT BrowserPlugin :
int process_id_;
std::string storage_partition_id_;
bool persist_storage_;
+ int guest_routing_id_;
typedef std::vector<v8::Persistent<v8::Function> > EventListeners;
typedef std::map<std::string, EventListeners> EventListenerMap;
EventListenerMap event_listener_map_;

Powered by Google App Engine
This is Rietveld 408576698