| OLD | NEW |
| 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_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 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 // Given an icon_path and icon size, read it if present and decode it into | 438 // Given an icon_path and icon size, read it if present and decode it into |
| 439 // result. In the browser process, this will DCHECK if not called on the | 439 // result. In the browser process, this will DCHECK if not called on the |
| 440 // file thread. To easily load extension images on the UI thread, see | 440 // file thread. To easily load extension images on the UI thread, see |
| 441 // ImageLoadingTracker. | 441 // ImageLoadingTracker. |
| 442 static void DecodeIconFromPath(const FilePath& icon_path, | 442 static void DecodeIconFromPath(const FilePath& icon_path, |
| 443 int icon_size, | 443 int icon_size, |
| 444 scoped_ptr<SkBitmap>* result); | 444 scoped_ptr<SkBitmap>* result); |
| 445 | 445 |
| 446 // Returns the default extension/app icon (for extensions or apps that don't | 446 // Returns the default extension/app icon (for extensions or apps that don't |
| 447 // have one). | 447 // have one). |
| 448 static const SkBitmap& GetDefaultIcon(bool is_app); | 448 static const gfx::ImageSkia& GetDefaultIcon(bool is_app); |
| 449 | 449 |
| 450 // Returns the base extension url for a given |extension_id|. | 450 // Returns the base extension url for a given |extension_id|. |
| 451 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); | 451 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); |
| 452 | 452 |
| 453 // Adds an extension to the scripting whitelist. Used for testing only. | 453 // Adds an extension to the scripting whitelist. Used for testing only. |
| 454 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); | 454 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); |
| 455 static const ScriptingWhitelist* GetScriptingWhitelist(); | 455 static const ScriptingWhitelist* GetScriptingWhitelist(); |
| 456 | 456 |
| 457 // Parses the host and api permissions from the specified permission |key| | 457 // Parses the host and api permissions from the specified permission |key| |
| 458 // from |manifest_|. | 458 // from |manifest_|. |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 | 1231 |
| 1232 UpdatedExtensionPermissionsInfo( | 1232 UpdatedExtensionPermissionsInfo( |
| 1233 const Extension* extension, | 1233 const Extension* extension, |
| 1234 const PermissionSet* permissions, | 1234 const PermissionSet* permissions, |
| 1235 Reason reason); | 1235 Reason reason); |
| 1236 }; | 1236 }; |
| 1237 | 1237 |
| 1238 } // namespace extensions | 1238 } // namespace extensions |
| 1239 | 1239 |
| 1240 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1240 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |