OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 }; | 124 }; |
125 | 125 |
126 // Do not change the order of entries or remove entries in this list | 126 // Do not change the order of entries or remove entries in this list |
127 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. | 127 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. |
128 enum Type { | 128 enum Type { |
129 TYPE_UNKNOWN = 0, | 129 TYPE_UNKNOWN = 0, |
130 TYPE_EXTENSION, | 130 TYPE_EXTENSION, |
131 TYPE_THEME, | 131 TYPE_THEME, |
132 TYPE_USER_SCRIPT, | 132 TYPE_USER_SCRIPT, |
133 TYPE_HOSTED_APP, | 133 TYPE_HOSTED_APP, |
134 TYPE_PACKAGED_APP, | 134 // This is marked legacy because platform apps are preferred. For |
135 // backwards compatibility, we can't remove support for packaged apps | |
Nico
2012/09/28 01:38:15
nit: trailing .
| |
136 TYPE_LEGACY_PACKAGED_APP, | |
135 TYPE_PLATFORM_APP | 137 TYPE_PLATFORM_APP |
136 }; | 138 }; |
137 | 139 |
138 enum SyncType { | 140 enum SyncType { |
139 SYNC_TYPE_NONE = 0, | 141 SYNC_TYPE_NONE = 0, |
140 SYNC_TYPE_EXTENSION, | 142 SYNC_TYPE_EXTENSION, |
141 SYNC_TYPE_APP | 143 SYNC_TYPE_APP |
142 }; | 144 }; |
143 | 145 |
144 // Declared requirements for the extension. | 146 // Declared requirements for the extension. |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
716 bool wants_file_access() const { return wants_file_access_; } | 718 bool wants_file_access() const { return wants_file_access_; } |
717 int creation_flags() const { return creation_flags_; } | 719 int creation_flags() const { return creation_flags_; } |
718 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 720 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
719 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 721 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
720 bool was_installed_by_default() const { | 722 bool was_installed_by_default() const { |
721 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 723 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
722 } | 724 } |
723 | 725 |
724 // App-related. | 726 // App-related. |
725 bool is_app() const { | 727 bool is_app() const { |
726 return is_packaged_app() || is_hosted_app() || is_platform_app(); | 728 return is_legacy_packaged_app() || is_hosted_app() || is_platform_app(); |
727 } | 729 } |
728 bool is_platform_app() const; | 730 bool is_platform_app() const; |
729 bool is_hosted_app() const; | 731 bool is_hosted_app() const; |
730 bool is_packaged_app() const; | 732 bool is_legacy_packaged_app() const; |
731 bool is_storage_isolated() const { return is_storage_isolated_; } | 733 bool is_storage_isolated() const { return is_storage_isolated_; } |
732 const URLPatternSet& web_extent() const { return extent_; } | 734 const URLPatternSet& web_extent() const { return extent_; } |
733 const std::string& launch_local_path() const { return launch_local_path_; } | 735 const std::string& launch_local_path() const { return launch_local_path_; } |
734 const std::string& launch_web_url() const { return launch_web_url_; } | 736 const std::string& launch_web_url() const { return launch_web_url_; } |
735 extension_misc::LaunchContainer launch_container() const { | 737 extension_misc::LaunchContainer launch_container() const { |
736 return launch_container_; | 738 return launch_container_; |
737 } | 739 } |
738 int launch_width() const { return launch_width_; } | 740 int launch_width() const { return launch_width_; } |
739 int launch_height() const { return launch_height_; } | 741 int launch_height() const { return launch_height_; } |
740 | 742 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1233 | 1235 |
1234 UpdatedExtensionPermissionsInfo( | 1236 UpdatedExtensionPermissionsInfo( |
1235 const Extension* extension, | 1237 const Extension* extension, |
1236 const PermissionSet* permissions, | 1238 const PermissionSet* permissions, |
1237 Reason reason); | 1239 Reason reason); |
1238 }; | 1240 }; |
1239 | 1241 |
1240 } // namespace extensions | 1242 } // namespace extensions |
1241 | 1243 |
1242 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1244 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |