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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. | 98 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. |
99 enum Type { | 99 enum Type { |
100 TYPE_UNKNOWN = 0, | 100 TYPE_UNKNOWN = 0, |
101 TYPE_EXTENSION, | 101 TYPE_EXTENSION, |
102 TYPE_THEME, | 102 TYPE_THEME, |
103 TYPE_USER_SCRIPT, | 103 TYPE_USER_SCRIPT, |
104 TYPE_HOSTED_APP, | 104 TYPE_HOSTED_APP, |
105 TYPE_PACKAGED_APP | 105 TYPE_PACKAGED_APP |
106 }; | 106 }; |
107 | 107 |
108 enum SyncType { | |
asargent_no_longer_on_chrome
2011/08/12 20:50:39
Do these literal values end up hardcoded into prot
| |
109 SYNC_TYPE_NONE = 0, | |
110 SYNC_TYPE_EXTENSION, | |
111 SYNC_TYPE_APP | |
112 }; | |
113 | |
108 // An NPAPI plugin included in the extension. | 114 // An NPAPI plugin included in the extension. |
109 struct PluginInfo { | 115 struct PluginInfo { |
110 FilePath path; // Path to the plugin. | 116 FilePath path; // Path to the plugin. |
111 bool is_public; // False if only this extension can load this plugin. | 117 bool is_public; // False if only this extension can load this plugin. |
112 }; | 118 }; |
113 | 119 |
114 // An NaCl module included in the extension. | 120 // An NaCl module included in the extension. |
115 struct NaClModuleInfo { | 121 struct NaClModuleInfo { |
116 GURL url; | 122 GURL url; |
117 std::string mime_type; | 123 std::string mime_type; |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 // extension page itself. | 480 // extension page itself. |
475 bool CanCaptureVisiblePage(const GURL& page_url, std::string* error) const; | 481 bool CanCaptureVisiblePage(const GURL& page_url, std::string* error) const; |
476 | 482 |
477 // Returns true if this extension updates itself using the extension | 483 // Returns true if this extension updates itself using the extension |
478 // gallery. | 484 // gallery. |
479 bool UpdatesFromGallery() const; | 485 bool UpdatesFromGallery() const; |
480 | 486 |
481 // Returns true if this extension or app includes areas within |origin|. | 487 // Returns true if this extension or app includes areas within |origin|. |
482 bool OverlapsWithOrigin(const GURL& origin) const; | 488 bool OverlapsWithOrigin(const GURL& origin) const; |
483 | 489 |
490 // Returns the sync bucket to use for this extension. | |
491 SyncType GetSyncType() const; | |
492 | |
484 // Accessors: | 493 // Accessors: |
485 | 494 |
486 const FilePath& path() const { return path_; } | 495 const FilePath& path() const { return path_; } |
487 const GURL& url() const { return extension_url_; } | 496 const GURL& url() const { return extension_url_; } |
488 Location location() const { return location_; } | 497 Location location() const { return location_; } |
489 const std::string& id() const { return id_; } | 498 const std::string& id() const { return id_; } |
490 const Version* version() const { return version_.get(); } | 499 const Version* version() const { return version_.get(); } |
491 const std::string VersionString() const; | 500 const std::string VersionString() const; |
492 const std::string& name() const { return name_; } | 501 const std::string& name() const { return name_; } |
493 const std::string& public_key() const { return public_key_; } | 502 const std::string& public_key() const { return public_key_; } |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
932 // only contain the removed permissions. | 941 // only contain the removed permissions. |
933 const ExtensionPermissionSet* permissions; | 942 const ExtensionPermissionSet* permissions; |
934 | 943 |
935 UpdatedExtensionPermissionsInfo( | 944 UpdatedExtensionPermissionsInfo( |
936 const Extension* extension, | 945 const Extension* extension, |
937 const ExtensionPermissionSet* permissions, | 946 const ExtensionPermissionSet* permissions, |
938 Reason reason); | 947 Reason reason); |
939 }; | 948 }; |
940 | 949 |
941 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 950 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |