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

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

Issue 109683007: Pass a Feature* to IsAnyFeatureAvailableToContext instead of a string name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update extension_api_stub.cc 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 | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 v8::Local<v8::Value> CallFunction(v8::Handle<v8::Function> function, 98 v8::Local<v8::Value> CallFunction(v8::Handle<v8::Function> function,
99 int argc, 99 int argc,
100 v8::Handle<v8::Value> argv[]) const; 100 v8::Handle<v8::Value> argv[]) const;
101 101
102 // Fires the onunload event on the unload_event module. 102 // Fires the onunload event on the unload_event module.
103 void DispatchOnUnloadEvent(); 103 void DispatchOnUnloadEvent();
104 104
105 // Returns the availability of the API |api_name|. 105 // Returns the availability of the API |api_name|.
106 Feature::Availability GetAvailability(const std::string& api_name); 106 Feature::Availability GetAvailability(const std::string& api_name);
107 107
108 // Returns whether the API |api_name| or any part of the API could be 108 // Returns whether the API |api| or any part of the API could be
109 // available in this context without taking into account the context's 109 // available in this context without taking into account the context's
110 // extension. 110 // extension.
111 bool IsAnyFeatureAvailableToContext(const std::string& api_name); 111 bool IsAnyFeatureAvailableToContext(const extensions::Feature& api);
112 112
113 // Returns a string description of the type of context this is. 113 // Returns a string description of the type of context this is.
114 std::string GetContextTypeDescription(); 114 std::string GetContextTypeDescription();
115 115
116 // RequestSender::Source implementation. 116 // RequestSender::Source implementation.
117 virtual ChromeV8Context* GetContext() OVERRIDE; 117 virtual ChromeV8Context* GetContext() OVERRIDE;
118 virtual void OnResponseReceived(const std::string& name, 118 virtual void OnResponseReceived(const std::string& name,
119 int request_id, 119 int request_id,
120 bool success, 120 bool success,
121 const base::ListValue& response, 121 const base::ListValue& response,
(...skipping 28 matching lines...) Expand all
150 PepperRequestProxy pepper_request_proxy_; 150 PepperRequestProxy pepper_request_proxy_;
151 151
152 v8::Isolate* isolate_; 152 v8::Isolate* isolate_;
153 153
154 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context); 154 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context);
155 }; 155 };
156 156
157 } // namespace extensions 157 } // namespace extensions
158 158
159 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_ 159 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/features/base_feature_provider.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698