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

Side by Side Diff: chrome/renderer/extensions/schema_generated_bindings.h

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_RENDERER_EXTENSIONS_SCHEMA_GENERATED_BINDINGS_H_
6 6 #define CHROME_RENDERER_EXTENSIONS_SCHEMA_GENERATED_BINDINGS_H_
7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_
8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_
9 #pragma once 7 #pragma once
10 8
11 #include <string> 9 #include <string>
12 10
13 class ExtensionDispatcher; 11 class ExtensionDispatcher;
14 class ChromeV8ContextSet; 12 class ChromeV8ContextSet;
15 13
16 namespace v8 { 14 namespace v8 {
17 class Extension; 15 class Extension;
18 } 16 }
19 17
20 class ExtensionProcessBindings { 18 namespace extensions {
19
20 // Generates JavaScript bindings for the extension system from the declarations
21 // in the extension_api.json file.
22 class SchemaGeneratedBindings {
21 public: 23 public:
22 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher); 24 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher);
23 25
24 // Handles a response to an API request. Sets |extension_id|. 26 // Handles a response to an API request. Sets |extension_id|.
25 static void HandleResponse(const ChromeV8ContextSet& contexts, 27 static void HandleResponse(const ChromeV8ContextSet& contexts,
26 int request_id, 28 int request_id,
27 bool success, 29 bool success,
28 const std::string& response, 30 const std::string& response,
29 const std::string& error, 31 const std::string& error,
30 std::string* extension_id); 32 std::string* extension_id);
31 33
32 static bool HasPendingRequests(const std::string& extension_id); 34 static bool HasPendingRequests(const std::string& extension_id);
33 }; 35 };
34 36
35 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ 37 } // namespace extensions
38
39 #endif // CHROME_RENDERER_EXTENSIONS_SCHEMA_GENERATED_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/renderer_extension_bindings.cc ('k') | chrome/renderer/extensions/schema_generated_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698