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

Side by Side Diff: extensions/common/extension_api.h

Issue 2275813002: Revert of Signal extension API schema corruption to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « extensions/browser/extension_message_filter.cc ('k') | extensions/common/extension_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 EXTENSIONS_COMMON_EXTENSION_API_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSION_API_H_
6 #define EXTENSIONS_COMMON_EXTENSION_API_H_ 6 #define EXTENSIONS_COMMON_EXTENSION_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Determines whether an API, or any parts of that API, are available in 99 // Determines whether an API, or any parts of that API, are available in
100 // |context|. 100 // |context|.
101 bool IsAnyFeatureAvailableToContext(const Feature& api, 101 bool IsAnyFeatureAvailableToContext(const Feature& api,
102 const Extension* extension, 102 const Extension* extension,
103 Feature::Context context, 103 Feature::Context context,
104 const GURL& url); 104 const GURL& url);
105 105
106 // Returns true if |name| is available to WebUI contexts on |url|. 106 // Returns true if |name| is available to WebUI contexts on |url|.
107 bool IsAvailableToWebUI(const std::string& name, const GURL& url); 107 bool IsAvailableToWebUI(const std::string& name, const GURL& url);
108 108
109 // Gets the schema for the extension API with namespace |full_name|, or 109 // Gets the schema for the extension API with namespace |full_name|.
110 // nullptr if the schema could not be loaded.
111 // Ownership remains with this object. 110 // Ownership remains with this object.
112 const base::DictionaryValue* GetSchema(const std::string& full_name); 111 const base::DictionaryValue* GetSchema(const std::string& full_name);
113 112
114 // Splits a full name from the extension API into its API and child name 113 // Splits a full name from the extension API into its API and child name
115 // parts. Some examples: 114 // parts. Some examples:
116 // 115 //
117 // "bookmarks.create" -> ("bookmarks", "create") 116 // "bookmarks.create" -> ("bookmarks", "create")
118 // "experimental.input.ui.cursorUp" -> ("experimental.input.ui", "cursorUp") 117 // "experimental.input.ui.cursorUp" -> ("experimental.input.ui", "cursorUp")
119 // "storage.sync.set" -> ("storage", "sync.get") 118 // "storage.sync.set" -> ("storage", "sync.get")
120 // "<unknown-api>.monkey" -> ("", "") 119 // "<unknown-api>.monkey" -> ("", "")
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // FeatureProviders used for resolving dependencies. 151 // FeatureProviders used for resolving dependencies.
153 typedef std::map<std::string, const FeatureProvider*> FeatureProviderMap; 152 typedef std::map<std::string, const FeatureProvider*> FeatureProviderMap;
154 FeatureProviderMap dependency_providers_; 153 FeatureProviderMap dependency_providers_;
155 154
156 DISALLOW_COPY_AND_ASSIGN(ExtensionAPI); 155 DISALLOW_COPY_AND_ASSIGN(ExtensionAPI);
157 }; 156 };
158 157
159 } // namespace extensions 158 } // namespace extensions
160 159
161 #endif // EXTENSIONS_COMMON_EXTENSION_API_H_ 160 #endif // EXTENSIONS_COMMON_EXTENSION_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_message_filter.cc ('k') | extensions/common/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698