OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 Icons icon_size, | 349 Icons icon_size, |
350 scoped_ptr<SkBitmap>* result); | 350 scoped_ptr<SkBitmap>* result); |
351 | 351 |
352 // Returns the default extension/app icon (for extensions or apps that don't | 352 // Returns the default extension/app icon (for extensions or apps that don't |
353 // have one). | 353 // have one). |
354 static const SkBitmap& GetDefaultIcon(bool is_app); | 354 static const SkBitmap& GetDefaultIcon(bool is_app); |
355 | 355 |
356 // Returns the base extension url for a given |extension_id|. | 356 // Returns the base extension url for a given |extension_id|. |
357 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); | 357 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); |
358 | 358 |
359 // Returns the url prefix for the extension/apps gallery. Can be set via the | 359 // Returns the URL prefix for the extension/apps gallery. Can be set via the |
360 // --apps-gallery-url switch. The URL returned will not contain a trailing | 360 // --apps-gallery-url switch. The URL returned will not contain a trailing |
361 // slash. Do not use this as a prefix/extent for the store. Instead see | 361 // slash. Do not use this as a prefix/extent for the store. Instead see |
362 // ExtensionService::GetWebStoreApp or | 362 // ExtensionService::GetWebStoreApp or |
363 // ExtensionService::IsDownloadFromGallery | 363 // ExtensionService::IsDownloadFromGallery |
364 static std::string ChromeStoreLaunchURL(); | 364 static std::string ChromeStoreLaunchURL(); |
365 | 365 |
366 // Returns the URL prefix for an item in the extension/app gallery. This URL | |
367 // will contain a trailing slash and should be concatenated with an item ID | |
368 // to get the item detail URL. | |
369 static std::string ChromeStoreItemDetailURLPrefix(); | |
Aaron Boodman
2011/08/17 04:53:03
I realize ChromeStoreLaunchURL() is already an exa
Mihai Parparita -not on Chrome
2011/08/17 23:00:16
Moved to extension_constants and renamed to GetWeb
| |
370 | |
366 // Adds an extension to the scripting whitelist. Used for testing only. | 371 // Adds an extension to the scripting whitelist. Used for testing only. |
367 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); | 372 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); |
368 static const ScriptingWhitelist* GetScriptingWhitelist(); | 373 static const ScriptingWhitelist* GetScriptingWhitelist(); |
369 | 374 |
370 // Parses the host and api permissions from the specified permission |key| | 375 // Parses the host and api permissions from the specified permission |key| |
371 // in the manifest |source|. | 376 // in the manifest |source|. |
372 bool ParsePermissions(const base::DictionaryValue* source, | 377 bool ParsePermissions(const base::DictionaryValue* source, |
373 const char* key, | 378 const char* key, |
374 int flags, | 379 int flags, |
375 std::string* error, | 380 std::string* error, |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
928 // only contain the removed permissions. | 933 // only contain the removed permissions. |
929 const ExtensionPermissionSet* permissions; | 934 const ExtensionPermissionSet* permissions; |
930 | 935 |
931 UpdatedExtensionPermissionsInfo( | 936 UpdatedExtensionPermissionsInfo( |
932 const Extension* extension, | 937 const Extension* extension, |
933 const ExtensionPermissionSet* permissions, | 938 const ExtensionPermissionSet* permissions, |
934 Reason reason); | 939 Reason reason); |
935 }; | 940 }; |
936 | 941 |
937 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 942 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |