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

Unified Diff: content/common/browser_plugin_messages.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@'s comments Created 8 years, 7 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/browser_plugin_messages.h
diff --git a/content/common/browser_plugin_messages.h b/content/common/browser_plugin_messages.h
index db40c45554c58d488fbcd054bcda34631cf083a9..ae4c622c646f4335f42b70749b7e9d0f41a988ad 100644
--- a/content/common/browser_plugin_messages.h
+++ b/content/common/browser_plugin_messages.h
@@ -13,6 +13,7 @@
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
+#include "ppapi/c/pp_instance.h"
#include "ui/gfx/size.h"
#define IPC_MESSAGE_START BrowserPluginMsgStart
@@ -20,53 +21,68 @@
// Browser plugin messages
// -----------------------------------------------------------------------------
-// These messages are from the host renderer to the browser process
+// These messages are from the embedder to the browser process
// A renderer sends this to the browser process when it wants to
// create a browser plugin. The browser will create a guest renderer process
// if necessary.
-IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_OpenChannel,
+IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_NavigateFromEmbedder,
int /* plugin instance id*/,
long long /* frame id */,
std::string /* src */,
gfx::Size /* size */)
+// Initially before we create a guest renderer, browser plugin containers
+// have a placeholder called BrowserPlugin where each BrowserPlugin has a unique
+// ID. During pepper plugin initialization, the embedder page and the plugin
+// negotiate an ID of type PP_Instance. The browser talks to the guest
+// RenderView via yet another identifier called the routing ID. The browser
+// has to keep track of how all these identifiers are associated with one
+// another.
+// For reference:
+// 1. The embedder page sees the guest renderer as a plugin and so it talks
+// to the guest via the PP_Instance identifer.
+// 2. The guest renderer talks to the browser and vice versa via a routing ID.
+// 3. The BrowserPlugin ID uniquely identifies a browser plugin container
+// instance within an embedder.
+// This identifier exists prior to the existence of the routing ID and the
+// PP_Instance identifier.
+// The purpose of this message is to tell the browser to map a PP_Instance
+// identifier to BrowserPlugin identifier.
+IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_MapInstance,
+ int /* container_id */,
+ PP_Instance /* instance */)
+
// -----------------------------------------------------------------------------
// These messages are from the browser process to the guest renderer.
-// Creates a channel to talk to a renderer. The guest renderer will respond
-// with BrowserPluginHostMsg_ChannelCreated.
-IPC_MESSAGE_CONTROL2(BrowserPluginMsg_CreateChannel,
- base::ProcessHandle /* host_renderer_process_handle */,
- int /* host_renderer_id */)
+IPC_MESSAGE_CONTROL2(BrowserPluginMsg_CompleteNavigation,
+ int /* guest_routing_id */,
+ PP_Instance /* instance */)
// -----------------------------------------------------------------------------
// These messages are from the guest renderer to the browser process
-// Reply to BrowserPluginMsg_CreateChannel. The handle will be NULL if the
-// channel could not be established. This could be because the IPC could not be
-// created for some weird reason, but more likely that the renderer failed to
-// initialize properly.
-IPC_MESSAGE_CONTROL1(BrowserPluginHostMsg_ChannelCreated,
- IPC::ChannelHandle /* handle */)
-
-// Indicates the guest renderer is ready in response to a ViewMsg_New
-IPC_MESSAGE_ROUTED0(BrowserPluginHostMsg_GuestReady)
+IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_ConnectToChannel,
+ IPC::ChannelHandle /* handle */)
-// A host renderer sends this message to the browser when it wants
+// A embedder sends this message to the browser when it wants
// to resize a guest plugin container so that the guest is relaid out
// according to the new size.
IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest,
int32, /* width */
int32 /* height */)
+IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_NavigateFromGuest,
+ PP_Instance /* instance */,
+ std::string /* src */)
+
// -----------------------------------------------------------------------------
-// These messages are from the browser process to the host renderer.
+// These messages are from the browser process to the embedder.
// A guest instance is ready to be placed.
-IPC_MESSAGE_ROUTED3(BrowserPluginMsg_GuestReady_ACK,
- int /* instance id */,
- base::ProcessHandle /* plugin_process_handle */,
- IPC::ChannelHandle /* handle to channel */)
-
+IPC_MESSAGE_CONTROL3(BrowserPluginMsg_LoadGuest,
+ int /* instance id */,
+ int /* guest_process_id */,
+ IPC::ChannelHandle /* channel_handle */)
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698