OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 }; | 96 }; |
97 | 97 |
98 // Do not change the order of entries or remove entries in this list | 98 // Do not change the order of entries or remove entries in this list |
99 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. | 99 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. |
100 enum Type { | 100 enum Type { |
101 TYPE_UNKNOWN = 0, | 101 TYPE_UNKNOWN = 0, |
102 TYPE_EXTENSION, | 102 TYPE_EXTENSION, |
103 TYPE_THEME, | 103 TYPE_THEME, |
104 TYPE_USER_SCRIPT, | 104 TYPE_USER_SCRIPT, |
105 TYPE_HOSTED_APP, | 105 TYPE_HOSTED_APP, |
106 TYPE_PACKAGED_APP | 106 TYPE_PACKAGED_APP, |
| 107 TYPE_PLATFORM_APP |
107 }; | 108 }; |
108 | 109 |
109 enum SyncType { | 110 enum SyncType { |
110 SYNC_TYPE_NONE = 0, | 111 SYNC_TYPE_NONE = 0, |
111 SYNC_TYPE_EXTENSION, | 112 SYNC_TYPE_EXTENSION, |
112 SYNC_TYPE_APP | 113 SYNC_TYPE_APP |
113 }; | 114 }; |
114 | 115 |
115 // An NPAPI plugin included in the extension. | 116 // An NPAPI plugin included in the extension. |
116 struct PluginInfo { | 117 struct PluginInfo { |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 int creation_flags() const { return creation_flags_; } | 541 int creation_flags() const { return creation_flags_; } |
541 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 542 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
542 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 543 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
543 | 544 |
544 const std::string& content_security_policy() const { | 545 const std::string& content_security_policy() const { |
545 return content_security_policy_; | 546 return content_security_policy_; |
546 } | 547 } |
547 | 548 |
548 // App-related. | 549 // App-related. |
549 bool is_app() const { return is_app_; } | 550 bool is_app() const { return is_app_; } |
| 551 bool is_platform_app() const { return is_platform_app_; } |
550 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } | 552 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } |
551 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } | 553 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } |
552 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } | 554 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } |
553 const URLPatternSet& web_extent() const { return extent_; } | 555 const URLPatternSet& web_extent() const { return extent_; } |
554 const std::string& launch_local_path() const { return launch_local_path_; } | 556 const std::string& launch_local_path() const { return launch_local_path_; } |
555 const std::string& launch_web_url() const { return launch_web_url_; } | 557 const std::string& launch_web_url() const { return launch_web_url_; } |
556 extension_misc::LaunchContainer launch_container() const { | 558 extension_misc::LaunchContainer launch_container() const { |
557 return launch_container_; | 559 return launch_container_; |
558 } | 560 } |
559 int launch_width() const { return launch_width_; } | 561 int launch_width() const { return launch_width_; } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 // A copy of the manifest that this extension was created from. | 815 // A copy of the manifest that this extension was created from. |
814 scoped_ptr<base::DictionaryValue> manifest_value_; | 816 scoped_ptr<base::DictionaryValue> manifest_value_; |
815 | 817 |
816 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 818 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
817 // which override the handling of those URLs. (see ExtensionOverrideUI). | 819 // which override the handling of those URLs. (see ExtensionOverrideUI). |
818 URLOverrideMap chrome_url_overrides_; | 820 URLOverrideMap chrome_url_overrides_; |
819 | 821 |
820 // Whether this extension uses app features. | 822 // Whether this extension uses app features. |
821 bool is_app_; | 823 bool is_app_; |
822 | 824 |
| 825 // Whether this app uses platform features. |
| 826 bool is_platform_app_; |
| 827 |
823 // Whether this extension requests isolated storage. | 828 // Whether this extension requests isolated storage. |
824 bool is_storage_isolated_; | 829 bool is_storage_isolated_; |
825 | 830 |
826 // The local path inside the extension to use with the launcher. | 831 // The local path inside the extension to use with the launcher. |
827 std::string launch_local_path_; | 832 std::string launch_local_path_; |
828 | 833 |
829 // A web url to use with the launcher. Note that this might be relative or | 834 // A web url to use with the launcher. Note that this might be relative or |
830 // absolute. If relative, it is relative to web_origin. | 835 // absolute. If relative, it is relative to web_origin. |
831 std::string launch_web_url_; | 836 std::string launch_web_url_; |
832 | 837 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 // only contain the removed permissions. | 928 // only contain the removed permissions. |
924 const ExtensionPermissionSet* permissions; | 929 const ExtensionPermissionSet* permissions; |
925 | 930 |
926 UpdatedExtensionPermissionsInfo( | 931 UpdatedExtensionPermissionsInfo( |
927 const Extension* extension, | 932 const Extension* extension, |
928 const ExtensionPermissionSet* permissions, | 933 const ExtensionPermissionSet* permissions, |
929 Reason reason); | 934 Reason reason); |
930 }; | 935 }; |
931 | 936 |
932 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 937 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |