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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 int creation_flags() const { return creation_flags_; } | 544 int creation_flags() const { return creation_flags_; } |
544 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 545 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
545 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 546 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
546 | 547 |
547 const std::string& content_security_policy() const { | 548 const std::string& content_security_policy() const { |
548 return content_security_policy_; | 549 return content_security_policy_; |
549 } | 550 } |
550 | 551 |
551 // App-related. | 552 // App-related. |
552 bool is_app() const { return is_app_; } | 553 bool is_app() const { return is_app_; } |
| 554 bool is_platform_app() const { return is_platform_app_; } |
553 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } | 555 bool is_hosted_app() const { return is_app() && !web_extent().is_empty(); } |
554 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } | 556 bool is_packaged_app() const { return is_app() && web_extent().is_empty(); } |
555 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } | 557 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } |
556 const URLPatternSet& web_extent() const { return extent_; } | 558 const URLPatternSet& web_extent() const { return extent_; } |
557 const std::string& launch_local_path() const { return launch_local_path_; } | 559 const std::string& launch_local_path() const { return launch_local_path_; } |
558 const std::string& launch_web_url() const { return launch_web_url_; } | 560 const std::string& launch_web_url() const { return launch_web_url_; } |
559 extension_misc::LaunchContainer launch_container() const { | 561 extension_misc::LaunchContainer launch_container() const { |
560 return launch_container_; | 562 return launch_container_; |
561 } | 563 } |
562 int launch_width() const { return launch_width_; } | 564 int launch_width() const { return launch_width_; } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 // A copy of the manifest that this extension was created from. | 818 // A copy of the manifest that this extension was created from. |
817 scoped_ptr<base::DictionaryValue> manifest_value_; | 819 scoped_ptr<base::DictionaryValue> manifest_value_; |
818 | 820 |
819 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 821 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
820 // which override the handling of those URLs. (see ExtensionOverrideUI). | 822 // which override the handling of those URLs. (see ExtensionOverrideUI). |
821 URLOverrideMap chrome_url_overrides_; | 823 URLOverrideMap chrome_url_overrides_; |
822 | 824 |
823 // Whether this extension uses app features. | 825 // Whether this extension uses app features. |
824 bool is_app_; | 826 bool is_app_; |
825 | 827 |
| 828 // Whether this app uses platform features. |
| 829 bool is_platform_app_; |
| 830 |
826 // Whether this extension requests isolated storage. | 831 // Whether this extension requests isolated storage. |
827 bool is_storage_isolated_; | 832 bool is_storage_isolated_; |
828 | 833 |
829 // The local path inside the extension to use with the launcher. | 834 // The local path inside the extension to use with the launcher. |
830 std::string launch_local_path_; | 835 std::string launch_local_path_; |
831 | 836 |
832 // A web url to use with the launcher. Note that this might be relative or | 837 // A web url to use with the launcher. Note that this might be relative or |
833 // absolute. If relative, it is relative to web_origin. | 838 // absolute. If relative, it is relative to web_origin. |
834 std::string launch_web_url_; | 839 std::string launch_web_url_; |
835 | 840 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 // only contain the removed permissions. | 931 // only contain the removed permissions. |
927 const ExtensionPermissionSet* permissions; | 932 const ExtensionPermissionSet* permissions; |
928 | 933 |
929 UpdatedExtensionPermissionsInfo( | 934 UpdatedExtensionPermissionsInfo( |
930 const Extension* extension, | 935 const Extension* extension, |
931 const ExtensionPermissionSet* permissions, | 936 const ExtensionPermissionSet* permissions, |
932 Reason reason); | 937 Reason reason); |
933 }; | 938 }; |
934 | 939 |
935 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 940 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |