| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 static void DecodeIconFromPath(const FilePath& icon_path, | 289 static void DecodeIconFromPath(const FilePath& icon_path, |
| 290 Icons icon_size, | 290 Icons icon_size, |
| 291 scoped_ptr<SkBitmap>* result); | 291 scoped_ptr<SkBitmap>* result); |
| 292 | 292 |
| 293 // Returns the base extension url for a given |extension_id|. | 293 // Returns the base extension url for a given |extension_id|. |
| 294 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); | 294 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); |
| 295 | 295 |
| 296 // Returns the url prefix for the extension/apps gallery. Can be set via the | 296 // Returns the url prefix for the extension/apps gallery. Can be set via the |
| 297 // --apps-gallery-url switch. The URL returned will not contain a trailing | 297 // --apps-gallery-url switch. The URL returned will not contain a trailing |
| 298 // slash. Do not use this as a prefix/extent for the store. Instead see | 298 // slash. Do not use this as a prefix/extent for the store. Instead see |
| 299 // ExtensionsService::GetWebStoreApp or | 299 // ExtensionService::GetWebStoreApp or |
| 300 // ExtensionsService::IsDownloadFromGallery | 300 // ExtensionService::IsDownloadFromGallery |
| 301 static std::string ChromeStoreLaunchURL(); | 301 static std::string ChromeStoreLaunchURL(); |
| 302 | 302 |
| 303 // Helper function that consolidates the check for whether the script can | 303 // Helper function that consolidates the check for whether the script can |
| 304 // execute into one location. |page_url| is the page that is the candidate | 304 // execute into one location. |page_url| is the page that is the candidate |
| 305 // for running the script, |can_execute_script_everywhere| specifies whether | 305 // for running the script, |can_execute_script_everywhere| specifies whether |
| 306 // the extension is on the whitelist, |allowed_pages| is a vector of | 306 // the extension is on the whitelist, |allowed_pages| is a vector of |
| 307 // URLPatterns, listing what access the extension has, |script| is the script | 307 // URLPatterns, listing what access the extension has, |script| is the script |
| 308 // pointer (if content script) and |error| is an optional parameter, which | 308 // pointer (if content script) and |error| is an optional parameter, which |
| 309 // will receive the error string listing why access was denied. | 309 // will receive the error string listing why access was denied. |
| 310 static bool CanExecuteScriptOnPage( | 310 static bool CanExecuteScriptOnPage( |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 extension_misc::LaunchContainer launch_container_; | 684 extension_misc::LaunchContainer launch_container_; |
| 685 | 685 |
| 686 // The default size of the container when launching. Only respected for | 686 // The default size of the container when launching. Only respected for |
| 687 // containers like panels and windows. | 687 // containers like panels and windows. |
| 688 int launch_width_; | 688 int launch_width_; |
| 689 int launch_height_; | 689 int launch_height_; |
| 690 | 690 |
| 691 // The Omnibox keyword for this extension, or empty if there is none. | 691 // The Omnibox keyword for this extension, or empty if there is none. |
| 692 std::string omnibox_keyword_; | 692 std::string omnibox_keyword_; |
| 693 | 693 |
| 694 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 694 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 695 UpdateExtensionPreservesLocation); | 695 UpdateExtensionPreservesLocation); |
| 696 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper); | 696 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper); |
| 697 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueInvalid); | 697 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueInvalid); |
| 698 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueValid); | 698 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueValid); |
| 699 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueValidNameInRTL); | 699 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueValidNameInRTL); |
| 700 FRIEND_TEST_ALL_PREFIXES(TabStripModelTest, Apps); | 700 FRIEND_TEST_ALL_PREFIXES(TabStripModelTest, Apps); |
| 701 | 701 |
| 702 DISALLOW_COPY_AND_ASSIGN(Extension); | 702 DISALLOW_COPY_AND_ASSIGN(Extension); |
| 703 }; | 703 }; |
| 704 | 704 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 732 std::set<std::string> extension_api_permissions; | 732 std::set<std::string> extension_api_permissions; |
| 733 // TODO(akalin): Once we have a unified ExtensionType, replace the | 733 // TODO(akalin): Once we have a unified ExtensionType, replace the |
| 734 // below member variables with a member of that type. | 734 // below member variables with a member of that type. |
| 735 bool is_theme; | 735 bool is_theme; |
| 736 bool is_app; | 736 bool is_app; |
| 737 bool converted_from_user_script; | 737 bool converted_from_user_script; |
| 738 GURL update_url; | 738 GURL update_url; |
| 739 }; | 739 }; |
| 740 | 740 |
| 741 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 741 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |