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 <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 553 |
554 // Accessors: | 554 // Accessors: |
555 | 555 |
556 const FilePath& path() const { return path_; } | 556 const FilePath& path() const { return path_; } |
557 const GURL& url() const { return extension_url_; } | 557 const GURL& url() const { return extension_url_; } |
558 Location location() const; | 558 Location location() const; |
559 const std::string& id() const; | 559 const std::string& id() const; |
560 const Version* version() const { return version_.get(); } | 560 const Version* version() const { return version_.get(); } |
561 const std::string VersionString() const; | 561 const std::string VersionString() const; |
562 const std::string& name() const { return name_; } | 562 const std::string& name() const { return name_; } |
| 563 const std::string& non_localized_name() const { return non_localized_name_; } |
563 const std::string public_key() const { return public_key_; } | 564 const std::string public_key() const { return public_key_; } |
564 const std::string& description() const { return description_; } | 565 const std::string& description() const { return description_; } |
565 int manifest_version() const { return manifest_version_; } | 566 int manifest_version() const { return manifest_version_; } |
566 bool converted_from_user_script() const { | 567 bool converted_from_user_script() const { |
567 return converted_from_user_script_; | 568 return converted_from_user_script_; |
568 } | 569 } |
569 const UserScriptList& content_scripts() const { return content_scripts_; } | 570 const UserScriptList& content_scripts() const { return content_scripts_; } |
570 ExtensionAction* page_action() const { return page_action_.get(); } | 571 ExtensionAction* page_action() const { return page_action_.get(); } |
571 ExtensionAction* browser_action() const { return browser_action_.get(); } | 572 ExtensionAction* browser_action() const { return browser_action_.get(); } |
572 const FileBrowserHandlerList* file_browser_handlers() const { | 573 const FileBrowserHandlerList* file_browser_handlers() const { |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 // Cached images for this extension. This should only be touched on the UI | 863 // Cached images for this extension. This should only be touched on the UI |
863 // thread. | 864 // thread. |
864 mutable ImageCache image_cache_; | 865 mutable ImageCache image_cache_; |
865 | 866 |
866 // The extension's human-readable name. Name is used for display purpose. It | 867 // The extension's human-readable name. Name is used for display purpose. It |
867 // might be wrapped with unicode bidi control characters so that it is | 868 // might be wrapped with unicode bidi control characters so that it is |
868 // displayed correctly in RTL context. | 869 // displayed correctly in RTL context. |
869 // NOTE: Name is UTF-8 and may contain non-ascii characters. | 870 // NOTE: Name is UTF-8 and may contain non-ascii characters. |
870 std::string name_; | 871 std::string name_; |
871 | 872 |
| 873 // A non-localized version of the extension's name. This is useful for |
| 874 // debug output. |
| 875 std::string non_localized_name_; |
| 876 |
872 // The version of this extension's manifest. We increase the manifest | 877 // The version of this extension's manifest. We increase the manifest |
873 // version when making breaking changes to the extension system. | 878 // version when making breaking changes to the extension system. |
874 // Version 1 was the first manifest version (implied by a lack of a | 879 // Version 1 was the first manifest version (implied by a lack of a |
875 // manifest_version attribute in the extension's manifest). We initialize | 880 // manifest_version attribute in the extension's manifest). We initialize |
876 // this member variable to 0 to distinguish the "uninitialized" case from | 881 // this member variable to 0 to distinguish the "uninitialized" case from |
877 // the case when we know the manifest version actually is 1. | 882 // the case when we know the manifest version actually is 1. |
878 int manifest_version_; | 883 int manifest_version_; |
879 | 884 |
880 // The absolute path to the directory the extension is stored in. | 885 // The absolute path to the directory the extension is stored in. |
881 FilePath path_; | 886 FilePath path_; |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 // only contain the removed permissions. | 1125 // only contain the removed permissions. |
1121 const ExtensionPermissionSet* permissions; | 1126 const ExtensionPermissionSet* permissions; |
1122 | 1127 |
1123 UpdatedExtensionPermissionsInfo( | 1128 UpdatedExtensionPermissionsInfo( |
1124 const Extension* extension, | 1129 const Extension* extension, |
1125 const ExtensionPermissionSet* permissions, | 1130 const ExtensionPermissionSet* permissions, |
1126 Reason reason); | 1131 Reason reason); |
1127 }; | 1132 }; |
1128 | 1133 |
1129 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1134 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |