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 // Exposes extension APIs into the extension process. | 5 // Exposes extension APIs into the extension process. |
6 | 6 |
7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 class ExtensionDispatcher; | 13 class ExtensionDispatcher; |
14 class ChromeV8ContextSet; | 14 class ChromeV8ContextSet; |
15 class GURL; | |
16 class URLPattern; | |
17 | |
18 namespace WebKit { | |
19 class WebView; | |
20 } | |
21 | 15 |
22 namespace v8 { | 16 namespace v8 { |
23 class Extension; | 17 class Extension; |
24 } | 18 } |
25 | 19 |
26 class ExtensionProcessBindings { | 20 class ExtensionProcessBindings { |
27 public: | 21 public: |
28 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher); | 22 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher); |
29 | 23 |
30 // Handles a response to an API request. Sets |extension_id|. | 24 // Handles a response to an API request. Sets |extension_id|. |
31 static void HandleResponse(const ChromeV8ContextSet& contexts, | 25 static void HandleResponse(const ChromeV8ContextSet& contexts, |
32 int request_id, | 26 int request_id, |
33 bool success, | 27 bool success, |
34 const std::string& response, | 28 const std::string& response, |
35 const std::string& error, | 29 const std::string& error, |
36 std::string* extension_id); | 30 std::string* extension_id); |
37 | 31 |
38 static bool HasPendingRequests(const std::string& extension_id); | 32 static bool HasPendingRequests(const std::string& extension_id); |
39 }; | 33 }; |
40 | 34 |
41 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 35 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
OLD | NEW |