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

Side by Side Diff: chrome/renderer/extensions/renderer_extension_bindings.cc

Issue 155707: Changed the extension.connect() API not to broadcast to all tabs. Added a (Closed)
Patch Set: review comments Created 11 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/renderer_extension_bindings.h" 5 #include "chrome/renderer/extensions/renderer_extension_bindings.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } // namespace 147 } // namespace
148 148
149 const char* RendererExtensionBindings::kName = 149 const char* RendererExtensionBindings::kName =
150 "chrome/RendererExtensionBindings"; 150 "chrome/RendererExtensionBindings";
151 151
152 v8::Extension* RendererExtensionBindings::Get() { 152 v8::Extension* RendererExtensionBindings::Get() {
153 return new ExtensionImpl(); 153 return new ExtensionImpl();
154 } 154 }
155 155
156 void RendererExtensionBindings::Invoke(const std::string& function_name, 156 void RendererExtensionBindings::Invoke(const std::string& function_name,
157 const ListValue& args) { 157 const ListValue& args,
158 RenderView* renderview) {
158 v8::HandleScope handle_scope; 159 v8::HandleScope handle_scope;
159 std::vector< v8::Handle<v8::Value> > argv = ListValueToV8(args); 160 std::vector< v8::Handle<v8::Value> > argv = ListValueToV8(args);
160 EventBindings::CallFunction(function_name, argv.size(), &argv[0]); 161 EventBindings::CallFunction(function_name, argv.size(), &argv[0], renderview);
161 } 162 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/renderer_extension_bindings.h ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698