| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 return chrome_url_overrides_; | 476 return chrome_url_overrides_; |
| 477 } | 477 } |
| 478 const std::string omnibox_keyword() const { return omnibox_keyword_; } | 478 const std::string omnibox_keyword() const { return omnibox_keyword_; } |
| 479 bool incognito_split_mode() const { return incognito_split_mode_; } | 479 bool incognito_split_mode() const { return incognito_split_mode_; } |
| 480 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } | 480 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } |
| 481 | 481 |
| 482 // App-related. | 482 // App-related. |
| 483 bool is_app() const { return is_app_; } | 483 bool is_app() const { return is_app_; } |
| 484 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } | 484 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } |
| 485 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } | 485 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } |
| 486 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } |
| 486 const ExtensionExtent& web_extent() const { return extent_; } | 487 const ExtensionExtent& web_extent() const { return extent_; } |
| 487 const std::string& launch_local_path() const { return launch_local_path_; } | 488 const std::string& launch_local_path() const { return launch_local_path_; } |
| 488 const std::string& launch_web_url() const { return launch_web_url_; } | 489 const std::string& launch_web_url() const { return launch_web_url_; } |
| 489 extension_misc::LaunchContainer launch_container() const { | 490 extension_misc::LaunchContainer launch_container() const { |
| 490 return launch_container_; | 491 return launch_container_; |
| 491 } | 492 } |
| 492 int launch_width() const { return launch_width_; } | 493 int launch_width() const { return launch_width_; } |
| 493 int launch_height() const { return launch_height_; } | 494 int launch_height() const { return launch_height_; } |
| 494 | 495 |
| 495 // Theme-related. | 496 // Theme-related. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 bool LoadIsApp(const DictionaryValue* manifest, std::string* error); | 568 bool LoadIsApp(const DictionaryValue* manifest, std::string* error); |
| 568 bool LoadExtent(const DictionaryValue* manifest, | 569 bool LoadExtent(const DictionaryValue* manifest, |
| 569 const char* key, | 570 const char* key, |
| 570 ExtensionExtent* extent, | 571 ExtensionExtent* extent, |
| 571 const char* list_error, | 572 const char* list_error, |
| 572 const char* value_error, | 573 const char* value_error, |
| 573 URLPattern::ParseOption parse_strictness, | 574 URLPattern::ParseOption parse_strictness, |
| 574 std::string* error); | 575 std::string* error); |
| 575 bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error); | 576 bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error); |
| 576 bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error); | 577 bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error); |
| 578 bool LoadAppIsolation(const DictionaryValue* manifest, std::string* error); |
| 577 bool EnsureNotHybridApp(const DictionaryValue* manifest, std::string* error); | 579 bool EnsureNotHybridApp(const DictionaryValue* manifest, std::string* error); |
| 578 | 580 |
| 579 // Helper method to load an ExtensionAction from the page_action or | 581 // Helper method to load an ExtensionAction from the page_action or |
| 580 // browser_action entries in the manifest. | 582 // browser_action entries in the manifest. |
| 581 ExtensionAction* LoadExtensionActionHelper( | 583 ExtensionAction* LoadExtensionActionHelper( |
| 582 const DictionaryValue* extension_action, std::string* error); | 584 const DictionaryValue* extension_action, std::string* error); |
| 583 | 585 |
| 584 // Helper method to load an ExtensionSidebarDefaults from the sidebar manifest | 586 // Helper method to load an ExtensionSidebarDefaults from the sidebar manifest |
| 585 // entry. | 587 // entry. |
| 586 ExtensionSidebarDefaults* LoadExtensionSidebarDefaults( | 588 ExtensionSidebarDefaults* LoadExtensionSidebarDefaults( |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 // A copy of the manifest that this extension was created from. | 731 // A copy of the manifest that this extension was created from. |
| 730 scoped_ptr<DictionaryValue> manifest_value_; | 732 scoped_ptr<DictionaryValue> manifest_value_; |
| 731 | 733 |
| 732 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 734 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
| 733 // which override the handling of those URLs. (see ExtensionOverrideUI). | 735 // which override the handling of those URLs. (see ExtensionOverrideUI). |
| 734 URLOverrideMap chrome_url_overrides_; | 736 URLOverrideMap chrome_url_overrides_; |
| 735 | 737 |
| 736 // Whether this extension uses app features. | 738 // Whether this extension uses app features. |
| 737 bool is_app_; | 739 bool is_app_; |
| 738 | 740 |
| 741 // Whether this extension requests isolated storage. |
| 742 bool is_storage_isolated_; |
| 743 |
| 739 // The local path inside the extension to use with the launcher. | 744 // The local path inside the extension to use with the launcher. |
| 740 std::string launch_local_path_; | 745 std::string launch_local_path_; |
| 741 | 746 |
| 742 // A web url to use with the launcher. Note that this might be relative or | 747 // A web url to use with the launcher. Note that this might be relative or |
| 743 // absolute. If relative, it is relative to web_origin. | 748 // absolute. If relative, it is relative to web_origin. |
| 744 std::string launch_web_url_; | 749 std::string launch_web_url_; |
| 745 | 750 |
| 746 // The window type that an app's manifest specifies to launch into. | 751 // The window type that an app's manifest specifies to launch into. |
| 747 // This is not always the window type an app will open into, because | 752 // This is not always the window type an app will open into, because |
| 748 // users can override the way each app launches. See | 753 // users can override the way each app launches. See |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 // Was the extension already disabled? | 821 // Was the extension already disabled? |
| 817 bool already_disabled; | 822 bool already_disabled; |
| 818 | 823 |
| 819 // The extension being unloaded - this should always be non-NULL. | 824 // The extension being unloaded - this should always be non-NULL. |
| 820 const Extension* extension; | 825 const Extension* extension; |
| 821 | 826 |
| 822 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 827 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
| 823 }; | 828 }; |
| 824 | 829 |
| 825 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 830 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |