| 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 | |
| 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 | |
| 362 // ExtensionService::GetWebStoreApp or | |
| 363 // ExtensionService::IsDownloadFromGallery | |
| 364 static std::string ChromeStoreLaunchURL(); | |
| 365 | |
| 366 // Adds an extension to the scripting whitelist. Used for testing only. | 359 // Adds an extension to the scripting whitelist. Used for testing only. |
| 367 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); | 360 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); |
| 368 static const ScriptingWhitelist* GetScriptingWhitelist(); | 361 static const ScriptingWhitelist* GetScriptingWhitelist(); |
| 369 | 362 |
| 370 // Parses the host and api permissions from the specified permission |key| | 363 // Parses the host and api permissions from the specified permission |key| |
| 371 // in the manifest |source|. | 364 // in the manifest |source|. |
| 372 bool ParsePermissions(const base::DictionaryValue* source, | 365 bool ParsePermissions(const base::DictionaryValue* source, |
| 373 const char* key, | 366 const char* key, |
| 374 int flags, | 367 int flags, |
| 375 std::string* error, | 368 std::string* error, |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 // only contain the removed permissions. | 921 // only contain the removed permissions. |
| 929 const ExtensionPermissionSet* permissions; | 922 const ExtensionPermissionSet* permissions; |
| 930 | 923 |
| 931 UpdatedExtensionPermissionsInfo( | 924 UpdatedExtensionPermissionsInfo( |
| 932 const Extension* extension, | 925 const Extension* extension, |
| 933 const ExtensionPermissionSet* permissions, | 926 const ExtensionPermissionSet* permissions, |
| 934 Reason reason); | 927 Reason reason); |
| 935 }; | 928 }; |
| 936 | 929 |
| 937 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 930 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |