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 #ifndef CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ |
7 | 7 |
8 #include "v8/include/v8.h" | 8 #include "v8/include/v8.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 class ListValue; | 12 class ListValue; |
13 class RenderThreadBase; | 13 class RenderView; |
14 | 14 |
15 // This class adds extension-related javascript bindings to a renderer. It is | 15 // This class adds extension-related javascript bindings to a renderer. It is |
16 // used by both web renderers and extension processes. | 16 // used by both web renderers and extension processes. |
17 class RendererExtensionBindings { | 17 class RendererExtensionBindings { |
18 public: | 18 public: |
19 // Name of extension, for dependencies. | 19 // Name of extension, for dependencies. |
20 static const char* kName; | 20 static const char* kName; |
21 | 21 |
22 // Creates an instance of the extension. | 22 // Creates an instance of the extension. |
23 static v8::Extension* Get(); | 23 static v8::Extension* Get(); |
24 | 24 |
25 // Call the given javascript function with the specified arguments. | 25 // Call the given javascript function with the specified arguments. |
26 static void Invoke(const std::string& function_name, const ListValue& args); | 26 static void Invoke(const std::string& function_name, const ListValue& args, |
| 27 RenderView* renderview); |
27 }; | 28 }; |
28 | 29 |
29 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ | 30 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ |
OLD | NEW |