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

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

Issue 61383003: Pass pepper apps API calls through the existing js apps API bindings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROME_V8_CONTEXT_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_ 6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/renderer/extensions/module_system.h" 12 #include "chrome/renderer/extensions/module_system.h"
13 #include "chrome/renderer/extensions/pepper_request_proxy.h"
13 #include "chrome/renderer/extensions/request_sender.h" 14 #include "chrome/renderer/extensions/request_sender.h"
14 #include "chrome/renderer/extensions/safe_builtins.h" 15 #include "chrome/renderer/extensions/safe_builtins.h"
15 #include "chrome/renderer/extensions/scoped_persistent.h" 16 #include "chrome/renderer/extensions/scoped_persistent.h"
16 #include "extensions/common/features/feature.h" 17 #include "extensions/common/features/feature.h"
17 #include "v8/include/v8.h" 18 #include "v8/include/v8.h"
18 19
19 namespace blink { 20 namespace blink {
20 class WebFrame; 21 class WebFrame;
21 } 22 }
22 23
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 69
69 ModuleSystem* module_system() { return module_system_.get(); } 70 ModuleSystem* module_system() { return module_system_.get(); }
70 71
71 SafeBuiltins* safe_builtins() { 72 SafeBuiltins* safe_builtins() {
72 return &safe_builtins_; 73 return &safe_builtins_;
73 } 74 }
74 const SafeBuiltins* safe_builtins() const { 75 const SafeBuiltins* safe_builtins() const {
75 return &safe_builtins_; 76 return &safe_builtins_;
76 } 77 }
77 78
79 PepperRequestProxy* pepper_request_proxy() {
80 return pepper_request_proxy_.get();
81 }
82
78 // Returns the ID of the extension associated with this context, or empty 83 // Returns the ID of the extension associated with this context, or empty
79 // string if there is no such extension. 84 // string if there is no such extension.
80 std::string GetExtensionID() const; 85 std::string GetExtensionID() const;
81 86
82 // Returns the RenderView associated with this context. Can return NULL if the 87 // Returns the RenderView associated with this context. Can return NULL if the
83 // context is in the process of being destroyed. 88 // context is in the process of being destroyed.
84 content::RenderView* GetRenderView() const; 89 content::RenderView* GetRenderView() const;
85 90
86 // Get the URL of this context's web frame. 91 // Get the URL of this context's web frame.
87 GURL GetURL() const; 92 GURL GetURL() const;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 139
135 // The type of context. 140 // The type of context.
136 Feature::Context context_type_; 141 Feature::Context context_type_;
137 142
138 // Owns and structures the JS that is injected to set up extension bindings. 143 // Owns and structures the JS that is injected to set up extension bindings.
139 scoped_ptr<ModuleSystem> module_system_; 144 scoped_ptr<ModuleSystem> module_system_;
140 145
141 // Contains safe copies of builtin objects like Function.prototype. 146 // Contains safe copies of builtin objects like Function.prototype.
142 SafeBuiltins safe_builtins_; 147 SafeBuiltins safe_builtins_;
143 148
149 // The proxy for this context for making API calls from Pepper via Javascript.
150 scoped_ptr<PepperRequestProxy> pepper_request_proxy_;
not at google - send to devlin 2013/12/03 00:49:14 No need to wrap this in a scoped_ptr?
Sam McNally 2013/12/03 08:52:58 Done.
151
144 v8::Isolate* isolate_; 152 v8::Isolate* isolate_;
145 153
146 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context); 154 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context);
147 }; 155 };
148 156
149 } // namespace extensions 157 } // namespace extensions
150 158
151 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_ 159 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698