summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 19:47:07 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 19:47:07 +0000
commit4b96a99b7ac1ab6f5dad78cb37868c0dc523f0a3 (patch)
tree0e444a6256c32ca3f46d5fbee6209773efa8361d /chrome/common
parent101f66b697ffde079ad66cd6733e36d1627cc12a (diff)
downloadchromium_src-4b96a99b7ac1ab6f5dad78cb37868c0dc523f0a3.zip
chromium_src-4b96a99b7ac1ab6f5dad78cb37868c0dc523f0a3.tar.gz
chromium_src-4b96a99b7ac1ab6f5dad78cb37868c0dc523f0a3.tar.bz2
Cleanup in handling of JavaScript URLs in tabs API
Reuse infrastructure for chrome.tabs.executeScript() to implement chrome.tabs.update({url:"javascript:...."}) since it has built-in safeguards against navigation races. BUG=77026 Review URL: http://codereview.chromium.org/6771062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension_messages.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h
index 5a0c4fd..69575e9a 100644
--- a/chrome/common/extensions/extension_messages.h
+++ b/chrome/common/extensions/extension_messages.h
@@ -53,6 +53,10 @@ IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
// Whether to inject into all frames, or only the root frame.
IPC_STRUCT_MEMBER(bool, all_frames)
+
+ // Whether to execute code in the main world (as opposed to an isolated
+ // world).
+ IPC_STRUCT_MEMBER(bool, in_main_world)
IPC_STRUCT_END()
IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo)
@@ -267,10 +271,10 @@ IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle,
SubstitutionMap /* message bundle */)
// Send from the renderer to the browser to return the script running result.
-IPC_MESSAGE_ROUTED2(ExtensionHostMsg_ExecuteCodeFinished,
- int, /* request id */
- bool /* whether the script ran successfully */)
-
+IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ExecuteCodeFinished,
+ int /* request id */,
+ bool /* whether the script ran successfully */,
+ std::string /* error message */)
IPC_MESSAGE_ROUTED2(ExtensionHostMsg_DidGetApplicationInfo,
int32 /* page_id */,