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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 return content_security_policy_; | 657 return content_security_policy_; |
658 } | 658 } |
659 | 659 |
660 // App-related. | 660 // App-related. |
661 bool is_app() const { | 661 bool is_app() const { |
662 return is_packaged_app() || is_hosted_app() || is_platform_app(); | 662 return is_packaged_app() || is_hosted_app() || is_platform_app(); |
663 } | 663 } |
664 bool is_platform_app() const; | 664 bool is_platform_app() const; |
665 bool is_hosted_app() const; | 665 bool is_hosted_app() const; |
666 bool is_packaged_app() const; | 666 bool is_packaged_app() const; |
667 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } | 667 bool is_storage_isolated() const { return is_storage_isolated_; } |
668 const URLPatternSet& web_extent() const { return extent_; } | 668 const URLPatternSet& web_extent() const { return extent_; } |
669 const std::string& launch_local_path() const { return launch_local_path_; } | 669 const std::string& launch_local_path() const { return launch_local_path_; } |
670 const std::string& launch_web_url() const { return launch_web_url_; } | 670 const std::string& launch_web_url() const { return launch_web_url_; } |
671 extension_misc::LaunchContainer launch_container() const { | 671 extension_misc::LaunchContainer launch_container() const { |
672 return launch_container_; | 672 return launch_container_; |
673 } | 673 } |
674 int launch_width() const { return launch_width_; } | 674 int launch_width() const { return launch_width_; } |
675 int launch_height() const { return launch_height_; } | 675 int launch_height() const { return launch_height_; } |
676 | 676 |
677 // Theme-related. | 677 // Theme-related. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 // TODO(aa): It is really weird the way this class essentially contains a copy | 731 // TODO(aa): It is really weird the way this class essentially contains a copy |
732 // of the underlying DictionaryValue in its members. We should decide to | 732 // of the underlying DictionaryValue in its members. We should decide to |
733 // either wrap the DictionaryValue and go with that only, or we should parse | 733 // either wrap the DictionaryValue and go with that only, or we should parse |
734 // into strong types and discard the value. But doing both is bad. | 734 // into strong types and discard the value. But doing both is bad. |
735 bool InitFromValue(int flags, string16* error); | 735 bool InitFromValue(int flags, string16* error); |
736 | 736 |
737 // The following are helpers for InitFromValue to load various features of the | 737 // The following are helpers for InitFromValue to load various features of the |
738 // extension from the manifest. | 738 // extension from the manifest. |
739 | 739 |
740 bool CheckMinimumChromeVersion(string16* error); | 740 bool CheckMinimumChromeVersion(string16* error); |
741 bool LoadAppIsolation(string16* error); | 741 bool LoadAppIsolation(const ExtensionAPIPermissionSet& api_permissions, |
| 742 string16* error); |
742 | 743 |
743 bool LoadRequiredFeatures(string16* error); | 744 bool LoadRequiredFeatures(string16* error); |
744 bool LoadName(string16* error); | 745 bool LoadName(string16* error); |
745 bool LoadVersion(string16* error); | 746 bool LoadVersion(string16* error); |
746 | 747 |
747 bool LoadAppFeatures(string16* error); | 748 bool LoadAppFeatures(string16* error); |
748 bool LoadExtent(const char* key, | 749 bool LoadExtent(const char* key, |
749 URLPatternSet* extent, | 750 URLPatternSet* extent, |
750 const char* list_error, | 751 const char* list_error, |
751 const char* value_error, | 752 const char* value_error, |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 // only contain the removed permissions. | 1129 // only contain the removed permissions. |
1129 const ExtensionPermissionSet* permissions; | 1130 const ExtensionPermissionSet* permissions; |
1130 | 1131 |
1131 UpdatedExtensionPermissionsInfo( | 1132 UpdatedExtensionPermissionsInfo( |
1132 const Extension* extension, | 1133 const Extension* extension, |
1133 const ExtensionPermissionSet* permissions, | 1134 const ExtensionPermissionSet* permissions, |
1134 Reason reason); | 1135 Reason reason); |
1135 }; | 1136 }; |
1136 | 1137 |
1137 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1138 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |