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

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

Issue 12522004: Lazily load extension API schemas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool CallChromeHiddenMethod( 95 bool CallChromeHiddenMethod(
96 const std::string& function_name, 96 const std::string& function_name,
97 int argc, 97 int argc,
98 v8::Handle<v8::Value>* argv, 98 v8::Handle<v8::Value>* argv,
99 v8::Handle<v8::Value>* result) const; 99 v8::Handle<v8::Value>* result) const;
100 100
101 // Returns the set of extension APIs that are available to this context. If no 101 // Returns the set of extension APIs that are available to this context. If no
102 // APIs are available, returns an empty set. 102 // APIs are available, returns an empty set.
103 const std::set<std::string>& GetAvailableExtensionAPIs(); 103 const std::set<std::string>& GetAvailableExtensionAPIs();
104 104
105 // Returns the availability of the API |api_name|.
105 Feature::Availability GetAvailability(const std::string& api_name); 106 Feature::Availability GetAvailability(const std::string& api_name);
106 107
107 // Returns a string description of the type of context this is. 108 // Returns a string description of the type of context this is.
108 std::string GetContextTypeDescription(); 109 std::string GetContextTypeDescription();
109 110
110 private: 111 private:
111 // The v8 context the bindings are accessible to. 112 // The v8 context the bindings are accessible to.
112 ScopedPersistent<v8::Context> v8_context_; 113 ScopedPersistent<v8::Context> v8_context_;
113 114
114 // The WebFrame associated with this context. This can be NULL because this 115 // The WebFrame associated with this context. This can be NULL because this
(...skipping 13 matching lines...) Expand all
128 // The extension APIs available to this context. 129 // The extension APIs available to this context.
129 std::set<std::string> available_extension_apis_; 130 std::set<std::string> available_extension_apis_;
130 bool available_extension_apis_initialized_; 131 bool available_extension_apis_initialized_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context); 133 DISALLOW_COPY_AND_ASSIGN(ChromeV8Context);
133 }; 134 };
134 135
135 } // namespace extensions 136 } // namespace extensions
136 137
137 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_ 138 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698