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