summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 21:05:37 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 21:05:37 +0000
commit7120f1327bcd3f0c33a983ee4a61c277747bb566 (patch)
treeda00ed514530587dd14f76941063d34a4afcda88 /chrome/renderer/render_view.cc
parent6d33519bd4d811112cef3d64d9c346531d65ab9b (diff)
downloadchromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.zip
chromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.tar.gz
chromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.tar.bz2
Changed the extension.connect() API not to broadcast to all tabs. Added a
more specific tabs.connect(tabId) API to connect to a specific tab. Also changed the ExtensionMessageService from a singleton to a Profile-owned object. BUG=12461 TEST=no Review URL: http://codereview.chromium.org/155707 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index a7445c0..0052e1e 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -38,6 +38,7 @@
#include "chrome/renderer/devtools_client.h"
#include "chrome/renderer/extensions/event_bindings.h"
#include "chrome/renderer/extensions/extension_process_bindings.h"
+#include "chrome/renderer/extensions/renderer_extension_bindings.h"
#include "chrome/renderer/localized_error.h"
#include "chrome/renderer/media/audio_renderer_impl.h"
#include "chrome/renderer/media/buffered_data_source.h"
@@ -415,6 +416,8 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
OnPopupNotificationVisibilityChanged)
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
IPC_MESSAGE_HANDLER(ViewMsg_ExtensionResponse, OnExtensionResponse)
+ IPC_MESSAGE_HANDLER(ViewMsg_ExtensionMessageInvoke,
+ OnExtensionMessageInvoke)
IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground)
IPC_MESSAGE_HANDLER(ViewMsg_EnableIntrinsicWidthChangedMode,
@@ -1471,7 +1474,7 @@ void RenderView::DocumentElementAvailable(WebFrame* frame) {
}
void RenderView::DidCreateScriptContextForFrame(WebFrame* webframe) {
- EventBindings::HandleContextCreated(webframe);
+ EventBindings::HandleContextCreated(webframe, false);
}
void RenderView::DidDestroyScriptContextForFrame(WebFrame* webframe) {
@@ -1479,7 +1482,7 @@ void RenderView::DidDestroyScriptContextForFrame(WebFrame* webframe) {
}
void RenderView::DidCreateIsolatedScriptContext(WebFrame* webframe) {
- EventBindings::HandleContextCreated(webframe);
+ EventBindings::HandleContextCreated(webframe, true);
}
WebNavigationPolicy RenderView::PolicyForNavigationAction(
@@ -2855,6 +2858,11 @@ void RenderView::OnExtensionResponse(int request_id,
request_id, success, response, error);
}
+void RenderView::OnExtensionMessageInvoke(const std::string& function_name,
+ const ListValue& args) {
+ RendererExtensionBindings::Invoke(function_name, args, this);
+}
+
// Dump all load time histograms.
//
// There are 13 histograms measuring various times.