| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |