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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 487 |
488 const FilePath& path() const { return path_; } | 488 const FilePath& path() const { return path_; } |
489 const GURL& url() const { return extension_url_; } | 489 const GURL& url() const { return extension_url_; } |
490 Location location() const { return location_; } | 490 Location location() const { return location_; } |
491 const std::string& id() const { return id_; } | 491 const std::string& id() const { return id_; } |
492 const Version* version() const { return version_.get(); } | 492 const Version* version() const { return version_.get(); } |
493 const std::string VersionString() const; | 493 const std::string VersionString() const; |
494 const std::string& name() const { return name_; } | 494 const std::string& name() const { return name_; } |
495 const std::string& public_key() const { return public_key_; } | 495 const std::string& public_key() const { return public_key_; } |
496 const std::string& description() const { return description_; } | 496 const std::string& description() const { return description_; } |
| 497 int manifest_version() const { return manifest_version_; } |
497 bool converted_from_user_script() const { | 498 bool converted_from_user_script() const { |
498 return converted_from_user_script_; | 499 return converted_from_user_script_; |
499 } | 500 } |
500 const UserScriptList& content_scripts() const { return content_scripts_; } | 501 const UserScriptList& content_scripts() const { return content_scripts_; } |
501 ExtensionAction* page_action() const { return page_action_.get(); } | 502 ExtensionAction* page_action() const { return page_action_.get(); } |
502 ExtensionAction* browser_action() const { return browser_action_.get(); } | 503 ExtensionAction* browser_action() const { return browser_action_.get(); } |
503 ExtensionSidebarDefaults* sidebar_defaults() const { | 504 ExtensionSidebarDefaults* sidebar_defaults() const { |
504 return sidebar_defaults_.get(); | 505 return sidebar_defaults_.get(); |
505 } | 506 } |
506 const FileBrowserHandlerList* file_browser_handlers() const { | 507 const FileBrowserHandlerList* file_browser_handlers() const { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 | 708 |
708 // The extension's human-readable name. Name is used for display purpose. It | 709 // The extension's human-readable name. Name is used for display purpose. It |
709 // might be wrapped with unicode bidi control characters so that it is | 710 // might be wrapped with unicode bidi control characters so that it is |
710 // displayed correctly in RTL context. | 711 // displayed correctly in RTL context. |
711 // NOTE: Name is UTF-8 and may contain non-ascii characters. | 712 // NOTE: Name is UTF-8 and may contain non-ascii characters. |
712 std::string name_; | 713 std::string name_; |
713 | 714 |
714 // The absolute path to the directory the extension is stored in. | 715 // The absolute path to the directory the extension is stored in. |
715 FilePath path_; | 716 FilePath path_; |
716 | 717 |
| 718 // The version of this extension's manifest. We increase the manifest |
| 719 // version when making breaking changes to the extension system. |
| 720 // Version 1 was the first manifest version (implied by a lack of a |
| 721 // manifest_version attribute in the extension's manifest). We initialize |
| 722 // this member variable to 0 to distinguish the "uninitialized" case from |
| 723 // the case when we know the manifest version actually is 1. |
| 724 int manifest_version_; |
| 725 |
717 // Default locale for fall back. Can be empty if extension is not localized. | 726 // Default locale for fall back. Can be empty if extension is not localized. |
718 std::string default_locale_; | 727 std::string default_locale_; |
719 | 728 |
720 // If true, a separate process will be used for the extension in incognito | 729 // If true, a separate process will be used for the extension in incognito |
721 // mode. | 730 // mode. |
722 bool incognito_split_mode_; | 731 bool incognito_split_mode_; |
723 | 732 |
724 // Whether the extension or app should be enabled when offline. | 733 // Whether the extension or app should be enabled when offline. |
725 bool offline_enabled_; | 734 bool offline_enabled_; |
726 | 735 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 // only contain the removed permissions. | 940 // only contain the removed permissions. |
932 const ExtensionPermissionSet* permissions; | 941 const ExtensionPermissionSet* permissions; |
933 | 942 |
934 UpdatedExtensionPermissionsInfo( | 943 UpdatedExtensionPermissionsInfo( |
935 const Extension* extension, | 944 const Extension* extension, |
936 const ExtensionPermissionSet* permissions, | 945 const ExtensionPermissionSet* permissions, |
937 Reason reason); | 946 Reason reason); |
938 }; | 947 }; |
939 | 948 |
940 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 949 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |