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

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

Issue 14494013: Allow API functions and events to have entries in _api_features.json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 (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"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // RequestSender::Source implementation. 113 // RequestSender::Source implementation.
114 virtual ChromeV8Context* GetContext() OVERRIDE; 114 virtual ChromeV8Context* GetContext() OVERRIDE;
115 virtual void OnResponseReceived(const std::string& name, 115 virtual void OnResponseReceived(const std::string& name,
116 int request_id, 116 int request_id,
117 bool success, 117 bool success,
118 const base::ListValue& response, 118 const base::ListValue& response,
119 const std::string& error) OVERRIDE; 119 const std::string& error) OVERRIDE;
120 120
121 private: 121 private:
122 Feature::Availability GetAvailabilityInternal(const std::string& api_name,
123 const Extension* extension);
124
125 // The v8 context the bindings are accessible to. 122 // The v8 context the bindings are accessible to.
126 ScopedPersistent<v8::Context> v8_context_; 123 ScopedPersistent<v8::Context> v8_context_;
127 124
128 // The WebFrame associated with this context. This can be NULL because this 125 // The WebFrame associated with this context. This can be NULL because this
129 // object can outlive is destroyed asynchronously. 126 // object can outlive is destroyed asynchronously.
130 WebKit::WebFrame* web_frame_; 127 WebKit::WebFrame* web_frame_;
131 128
132 // The extension associated with this context, or NULL if there is none. This 129 // The extension associated with this context, or NULL if there is none. This
133 // might be a hosted app in the case that this context is hosting a web URL. 130 // might be a hosted app in the case that this context is hosting a web URL.
134 scoped_refptr<const Extension> extension_; 131 scoped_refptr<const Extension> extension_;
135 132
136 // The type of context. 133 // The type of context.
137 Feature::Context context_type_; 134 Feature::Context context_type_;
138 135
139 // Owns and structures the JS that is injected to set up extension bindings. 136 // Owns and structures the JS that is injected to set up extension bindings.
140 scoped_ptr<ModuleSystem> module_system_; 137 scoped_ptr<ModuleSystem> module_system_;
141 138
142 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context); 139 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context);
143 }; 140 };
144 141
145 } // namespace extensions 142 } // namespace extensions
146 143
147 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_ 144 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698