| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "v8/include/v8.h" | |
| 10 | |
| 11 #include <string> | 9 #include <string> |
| 12 | 10 |
| 13 class ExtensionRendererContext; | 11 class ExtensionRendererContext; |
| 14 class GURL; | 12 class GURL; |
| 15 class RenderView; | 13 class RenderView; |
| 16 | 14 |
| 15 namespace v8 { |
| 16 class Extension; |
| 17 } |
| 18 |
| 17 // This class adds extension-related javascript bindings to a renderer. It is | 19 // This class adds extension-related javascript bindings to a renderer. It is |
| 18 // used by both web renderers and extension processes. | 20 // used by both web renderers and extension processes. |
| 19 class RendererExtensionBindings { | 21 class RendererExtensionBindings { |
| 20 public: | 22 public: |
| 21 // Name of extension, for dependencies. | 23 // Name of extension, for dependencies. |
| 22 static const char* kName; | 24 static const char* kName; |
| 23 | 25 |
| 24 // Creates an instance of the extension. | 26 // Creates an instance of the extension. |
| 25 static v8::Extension* Get(ExtensionRendererContext* context); | 27 static v8::Extension* Get(ExtensionRendererContext* context); |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ | 30 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ |
| OLD | NEW |