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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // the appropriate header & footer. | 401 // the appropriate header & footer. |
402 static bool FormatPEMForFileOutput(const std::string& input, | 402 static bool FormatPEMForFileOutput(const std::string& input, |
403 std::string* output, | 403 std::string* output, |
404 bool is_public); | 404 bool is_public); |
405 | 405 |
406 // Given an extension, icon size, and match type, read a valid icon if present | 406 // Given an extension, icon size, and match type, read a valid icon if present |
407 // and decode it into result. In the browser process, this will DCHECK if not | 407 // and decode it into result. In the browser process, this will DCHECK if not |
408 // called on the file thread. To easily load extension images on the UI | 408 // called on the file thread. To easily load extension images on the UI |
409 // thread, see ImageLoadingTracker. | 409 // thread, see ImageLoadingTracker. |
410 static void DecodeIcon(const Extension* extension, | 410 static void DecodeIcon(const Extension* extension, |
411 ExtensionIconSet::Icons icon_size, | 411 int icon_size, |
412 ExtensionIconSet::MatchType match_type, | 412 ExtensionIconSet::MatchType match_type, |
413 scoped_ptr<SkBitmap>* result); | 413 scoped_ptr<SkBitmap>* result); |
414 | 414 |
415 // Given an extension and icon size, read it if present and decode it into | 415 // Given an extension and icon size, read it if present and decode it into |
416 // result. In the browser process, this will DCHECK if not called on the | 416 // result. In the browser process, this will DCHECK if not called on the |
417 // file thread. To easily load extension images on the UI thread, see | 417 // file thread. To easily load extension images on the UI thread, see |
418 // ImageLoadingTracker. | 418 // ImageLoadingTracker. |
419 static void DecodeIcon(const Extension* extension, | 419 static void DecodeIcon(const Extension* extension, |
420 ExtensionIconSet::Icons icon_size, | 420 int icon_size, |
421 scoped_ptr<SkBitmap>* result); | 421 scoped_ptr<SkBitmap>* result); |
422 | 422 |
423 // Given an icon_path and icon size, read it if present and decode it into | 423 // Given an icon_path and icon size, read it if present and decode it into |
424 // result. In the browser process, this will DCHECK if not called on the | 424 // result. In the browser process, this will DCHECK if not called on the |
425 // file thread. To easily load extension images on the UI thread, see | 425 // file thread. To easily load extension images on the UI thread, see |
426 // ImageLoadingTracker. | 426 // ImageLoadingTracker. |
427 static void DecodeIconFromPath(const FilePath& icon_path, | 427 static void DecodeIconFromPath(const FilePath& icon_path, |
428 ExtensionIconSet::Icons icon_size, | 428 int icon_size, |
429 scoped_ptr<SkBitmap>* result); | 429 scoped_ptr<SkBitmap>* result); |
430 | 430 |
431 // Returns the default extension/app icon (for extensions or apps that don't | 431 // Returns the default extension/app icon (for extensions or apps that don't |
432 // have one). | 432 // have one). |
433 static const SkBitmap& GetDefaultIcon(bool is_app); | 433 static const SkBitmap& GetDefaultIcon(bool is_app); |
434 | 434 |
435 // Returns the base extension url for a given |extension_id|. | 435 // Returns the base extension url for a given |extension_id|. |
436 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); | 436 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); |
437 | 437 |
438 // Adds an extension to the scripting whitelist. Used for testing only. | 438 // Adds an extension to the scripting whitelist. Used for testing only. |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 | 1195 |
1196 UpdatedExtensionPermissionsInfo( | 1196 UpdatedExtensionPermissionsInfo( |
1197 const Extension* extension, | 1197 const Extension* extension, |
1198 const PermissionSet* permissions, | 1198 const PermissionSet* permissions, |
1199 Reason reason); | 1199 Reason reason); |
1200 }; | 1200 }; |
1201 | 1201 |
1202 } // namespace extensions | 1202 } // namespace extensions |
1203 | 1203 |
1204 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1204 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |