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

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

Issue 234413005: Move most of ChromeV8Context to a base ScriptContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: factor feature_channel out of module_system Created 6 years, 8 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PEPPER_REQUEST_NATIVES_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_
6 #define CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_ 6 #define CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/renderer/extensions/object_backed_native_handler.h" 9 #include "extensions/renderer/object_backed_native_handler.h"
10 10
11 namespace base { 11 namespace base {
12 class Value; 12 class Value;
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 class ChromeV8Context;
16 17
17 // Custom bindings for handling API calls from pepper plugins. 18 // Custom bindings for handling API calls from pepper plugins.
18 class PepperRequestNatives : public ObjectBackedNativeHandler { 19 class PepperRequestNatives : public ObjectBackedNativeHandler {
19 public: 20 public:
20 explicit PepperRequestNatives(ChromeV8Context* context); 21 explicit PepperRequestNatives(ChromeV8Context* context);
21 22
22 private: 23 private:
23 // Sends a response to an API call to the pepper plugin which made the call. 24 // Sends a response to an API call to the pepper plugin which made the call.
24 // |args| should contain: 25 // |args| should contain:
25 // |request_id|: An int containing the id of the request. 26 // |request_id|: An int containing the id of the request.
26 // |response|: An array containing the response. 27 // |response|: An array containing the response.
27 // |error|: A string containing the error message if an error occurred or 28 // |error|: A string containing the error message if an error occurred or
28 // null if the call was successful. 29 // null if the call was successful.
29 void SendResponse(const v8::FunctionCallbackInfo<v8::Value>& args); 30 void SendResponse(const v8::FunctionCallbackInfo<v8::Value>& args);
30 31
31 DISALLOW_COPY_AND_ASSIGN(PepperRequestNatives); 32 DISALLOW_COPY_AND_ASSIGN(PepperRequestNatives);
32 }; 33 };
33 34
34 } // namespace extensions 35 } // namespace extensions
35 36
36 #endif // CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_ 37 #endif // CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/object_backed_native_handler.cc ('k') | chrome/renderer/extensions/pepper_request_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698