summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-24 04:56:06 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-24 04:56:06 +0000
commit44703cc73a24cc39b3e5e832f447d8261701fa4c (patch)
tree79f249332af4fc3613b4f59878233668cbde1908 /content/common
parent363e33dcc1b59766434bab7b85f9f9b7ce108237 (diff)
downloadchromium_src-44703cc73a24cc39b3e5e832f447d8261701fa4c.zip
chromium_src-44703cc73a24cc39b3e5e832f447d8261701fa4c.tar.gz
chromium_src-44703cc73a24cc39b3e5e832f447d8261701fa4c.tar.bz2
<webview>: Implement ExecuteScript
This patch implements executeScript for <webview> by using extensions bindings for forwarding requests to the browser process from the app process. The <webview> shim passes the ProcessId and the RouteID of the guest process to the ExecuteScriptFunction object in the browser process. From there, ExecuteScriptFunction grabs the guest web contents, and creates a ScriptExecutor object attached to the guest WebContents. The callback is supported trivially through the extension bindings. When a new guest web contents is created, we inject the Chrome App's extension information into the guest process, so that executeScript knows to bypass permission requests when attempting to execute script within the guest (as suggested by mpcomplete@). BUG=153530 Test=WebViewTest.Shim, webViewExecuteScript Review URL: https://codereview.chromium.org/11968054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/browser_plugin_messages.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/content/common/browser_plugin_messages.h b/content/common/browser_plugin_messages.h
index f20be30..5d33460 100644
--- a/content/common/browser_plugin_messages.h
+++ b/content/common/browser_plugin_messages.h
@@ -67,8 +67,10 @@ IPC_STRUCT_BEGIN(BrowserPluginMsg_LoadCommit_Params)
IPC_STRUCT_MEMBER(GURL, url)
// Indicates whether the navigation was on the top-level frame.
IPC_STRUCT_MEMBER(bool, is_top_level)
- // Chrome's process ID for the guest.
+ // The browser's process ID for the guest.
IPC_STRUCT_MEMBER(int, process_id)
+ // The browser's routing ID for the guest's RenderView.
+ IPC_STRUCT_MEMBER(int, route_id)
// The index of the current navigation entry after this navigation was
// committed.
IPC_STRUCT_MEMBER(int, current_entry_index)
@@ -283,7 +285,7 @@ IPC_MESSAGE_ROUTED4(BrowserPluginMsg_LoadRedirect,
bool /* is_top_level */)
// When the guest commits a navigation, the browser process informs
-// the embedder through the BrowserPluginMsg_DidCommit message.
+// the embedder through the BrowserPluginMsg_LoadCommit message.
IPC_MESSAGE_ROUTED2(BrowserPluginMsg_LoadCommit,
int /* instance_id */,
BrowserPluginMsg_LoadCommit_Params)