diff options
author | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 23:58:05 +0000 |
---|---|---|
committer | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 23:58:05 +0000 |
commit | fb325d125715eb0ad19bfe964d2b9ef7e4f4afb3 (patch) | |
tree | bbd3d7eff84cbd1a76abf287dc7691c7ad4af248 /content/common | |
parent | 15f8c76a30c20d70ceae3b6d6ea6c70d84b0ac6b (diff) | |
download | chromium_src-fb325d125715eb0ad19bfe964d2b9ef7e4f4afb3.zip chromium_src-fb325d125715eb0ad19bfe964d2b9ef7e4f4afb3.tar.gz chromium_src-fb325d125715eb0ad19bfe964d2b9ef7e4f4afb3.tar.bz2 |
Browser Plugin: Simplified BrowserPluginManager
BrowserPluginManager is no longer a singleton.
BrowserPluginManager is now a RenderViewObserver.
All BrowserPluginMsg_* are routed which means they're targeted at a particular RenderView.
This means that more than one BrowserPluginManager can exist per process.
BrowserPluginManager is now refcounted and so it exists as long as a BrowserPlugin or RenderViewImpl
holds a reference to it.
In tests, we inject a BrowserPluginManagerFactory that creates MockBrowserPluginManagers.
BUG=159936
Test=BrowserPluginTest.*, BrowserPluginHostTest.*
Review URL: https://chromiumcodereview.appspot.com/11416074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/browser_plugin_messages.h | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/content/common/browser_plugin_messages.h b/content/common/browser_plugin_messages.h index 7267b13..782b9a3 100644 --- a/content/common/browser_plugin_messages.h +++ b/content/common/browser_plugin_messages.h @@ -227,82 +227,81 @@ IPC_SYNC_MESSAGE_ROUTED2_0(BrowserPluginHostMsg_ResizeGuest, // Once the swapped out guest RenderView has been created in the embedder render // process, the browser process informs the embedder of its routing ID. -IPC_MESSAGE_CONTROL2(BrowserPluginMsg_GuestContentWindowReady, - int /* instance_id */, - int /* source_routing_id */) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_GuestContentWindowReady, + int /* instance_id */, + int /* source_routing_id */) // When the guest begins to load a page, the browser process informs the // embedder through the BrowserPluginMsg_LoadStart message. -IPC_MESSAGE_CONTROL3(BrowserPluginMsg_LoadStart, - int /* instance_id */, - GURL /* url */, - bool /* is_top_level */) +IPC_MESSAGE_ROUTED3(BrowserPluginMsg_LoadStart, + int /* instance_id */, + GURL /* url */, + bool /* is_top_level */) // If the guest fails to commit a page load then it will inform the // embedder through the BrowserPluginMsg_LoadAbort. A description // of the error will be stored in |type|. The list of known error // types can be found in net/base/net_error_list.h. -IPC_MESSAGE_CONTROL4(BrowserPluginMsg_LoadAbort, - int /* instance_id */, - GURL /* url */, - bool /* is_top_level */, - std::string /* type */) +IPC_MESSAGE_ROUTED4(BrowserPluginMsg_LoadAbort, + int /* instance_id */, + GURL /* url */, + bool /* is_top_level */, + std::string /* type */) // When the guest redirects a navigation, the browser process informs the // embedder through the BrowserPluginMsg_LoadRedirect message. -IPC_MESSAGE_CONTROL4(BrowserPluginMsg_LoadRedirect, - int /* instance_id */, - GURL /* old_url */, - GURL /* new_url */, - bool /* is_top_level */) +IPC_MESSAGE_ROUTED4(BrowserPluginMsg_LoadRedirect, + int /* instance_id */, + GURL /* old_url */, + GURL /* new_url */, + bool /* is_top_level */) // When the guest commits a navigation, the browser process informs // the embedder through the BrowserPluginMsg_DidCommit message. -IPC_MESSAGE_CONTROL2(BrowserPluginMsg_LoadCommit, - int /* instance_id */, - BrowserPluginMsg_LoadCommit_Params) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_LoadCommit, + int /* instance_id */, + BrowserPluginMsg_LoadCommit_Params) // When the guest page has completed loading (including subframes), the browser // process informs the embedder through the BrowserPluginMsg_LoadStop message. -IPC_MESSAGE_CONTROL1(BrowserPluginMsg_LoadStop, - int /* instance_id */) +IPC_MESSAGE_ROUTED1(BrowserPluginMsg_LoadStop, + int /* instance_id */) // When the guest crashes, the browser process informs the embedder through this // message. -IPC_MESSAGE_CONTROL3(BrowserPluginMsg_GuestGone, - int /* instance_id */, - int /* process_id */, - int /* This is really base::TerminationStatus */) +IPC_MESSAGE_ROUTED3(BrowserPluginMsg_GuestGone, + int /* instance_id */, + int /* process_id */, + int /* This is really base::TerminationStatus */) // When the user tabs to the end of the tab stops of a guest, the browser // process informs the embedder to tab out of the browser plugin. -IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus, - int /* instance_id */, - bool /* reverse */) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_AdvanceFocus, + int /* instance_id */, + bool /* reverse */) // When the guest starts/stops listening to touch events, it needs to notify the // plugin in the embedder about it. -IPC_MESSAGE_CONTROL2(BrowserPluginMsg_ShouldAcceptTouchEvents, - int /* instance_id */, - bool /* accept */) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_ShouldAcceptTouchEvents, + int /* instance_id */, + bool /* accept */) // Inform the embedder of the cursor the guest wishes to display. -IPC_MESSAGE_CONTROL2(BrowserPluginMsg_SetCursor, - int /* instance_id */, - WebCursor /* cursor */) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_SetCursor, + int /* instance_id */, + WebCursor /* cursor */) // The guest has damage it wants to convey to the embedder so that it can // update its backing store. -IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect, - int /* instance_id */, - int /* message_id */, - BrowserPluginMsg_UpdateRect_Params) +IPC_MESSAGE_ROUTED3(BrowserPluginMsg_UpdateRect, + int /* instance_id */, + int /* message_id */, + BrowserPluginMsg_UpdateRect_Params) // Requests the renderer to find out if a browser plugin is at position // (|x|, |y|) within the embedder. // The response message is BrowserPluginHostMsg_PluginAtPositionResponse. // The |request_id| uniquely identifies a request from an embedder. -IPC_MESSAGE_CONTROL3(BrowserPluginMsg_PluginAtPositionRequest, - int /* source_routing_id */, - int /* request_id */, - gfx::Point /* position */) +IPC_MESSAGE_ROUTED2(BrowserPluginMsg_PluginAtPositionRequest, + int /* request_id */, + gfx::Point /* position */) |