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

Side by Side Diff: apps/shell/common/shell_extensions_client.cc

Issue 183893041: Move sockets APIs out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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 #include "apps/shell/common/shell_extensions_client.h" 5 #include "apps/shell/common/shell_extensions_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/extensions/api/generated_schemas.h"
8 #include "chrome/common/extensions/api/sockets/sockets_manifest_handler.h" 9 #include "chrome/common/extensions/api/sockets/sockets_manifest_handler.h"
9 #include "chrome/common/extensions/features/base_feature_provider.h" 10 #include "chrome/common/extensions/features/base_feature_provider.h"
10 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" 11 #include "chrome/common/extensions/permissions/chrome_api_permissions.h"
12 #include "extensions/common/api/generated_schemas.h"
11 #include "extensions/common/common_manifest_handlers.h" 13 #include "extensions/common/common_manifest_handlers.h"
12 #include "extensions/common/manifest_handler.h" 14 #include "extensions/common/manifest_handler.h"
13 #include "extensions/common/permissions/permission_message_provider.h" 15 #include "extensions/common/permissions/permission_message_provider.h"
14 #include "extensions/common/permissions/permissions_provider.h" 16 #include "extensions/common/permissions/permissions_provider.h"
15 #include "extensions/common/url_pattern_set.h" 17 #include "extensions/common/url_pattern_set.h"
16 18
17 using extensions::APIPermissionInfo; 19 using extensions::APIPermissionInfo;
18 using extensions::APIPermissionSet; 20 using extensions::APIPermissionSet;
19 using extensions::Extension; 21 using extensions::Extension;
20 using extensions::Manifest; 22 using extensions::Manifest;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 NOTIMPLEMENTED(); 143 NOTIMPLEMENTED();
142 return URLPatternSet(); 144 return URLPatternSet();
143 } 145 }
144 146
145 bool ShellExtensionsClient::IsScriptableURL(const GURL& url, 147 bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
146 std::string* error) const { 148 std::string* error) const {
147 NOTIMPLEMENTED(); 149 NOTIMPLEMENTED();
148 return true; 150 return true;
149 } 151 }
150 152
153 bool ShellExtensionsClient::IsAPISchemaGenerated(
154 const std::string& name) const {
155 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs
156 // moved out. See http://crbug.com/349042.
157 return extensions::api::GeneratedSchemas::IsGenerated(name) ||
158 extensions::core_api::GeneratedSchemas::IsGenerated(name);
159 }
160
161 base::StringPiece ShellExtensionsClient::GetAPISchema(
162 const std::string& name) const {
163 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs
164 // moved out. See http://crbug.com/349042.
165 if (extensions::api::GeneratedSchemas::IsGenerated(name))
166 return extensions::api::GeneratedSchemas::Get(name);
167 return extensions::core_api::GeneratedSchemas::Get(name);
168 }
169
151 } // namespace apps 170 } // namespace apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698