| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 EXTENSIONS_COMMON_EXTENSION_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ |
| 6 #define EXTENSIONS_COMMON_EXTENSION_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 bool was_installed_by_default() const { | 335 bool was_installed_by_default() const { |
| 336 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 336 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
| 337 } | 337 } |
| 338 bool was_installed_by_oem() const { | 338 bool was_installed_by_oem() const { |
| 339 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; | 339 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; |
| 340 } | 340 } |
| 341 bool was_installed_by_custodian() const { | 341 bool was_installed_by_custodian() const { |
| 342 return (creation_flags_ & WAS_INSTALLED_BY_CUSTODIAN) != 0; | 342 return (creation_flags_ & WAS_INSTALLED_BY_CUSTODIAN) != 0; |
| 343 } | 343 } |
| 344 | 344 |
| 345 // App-related. | 345 // Type-related queries. |
| 346 bool is_app() const; | 346 bool is_app() const; |
| 347 bool is_platform_app() const; | 347 bool is_platform_app() const; |
| 348 bool is_hosted_app() const; | 348 bool is_hosted_app() const; |
| 349 bool is_legacy_packaged_app() const; | 349 bool is_legacy_packaged_app() const; |
| 350 bool is_extension() const; | 350 bool is_extension() const; |
| 351 bool is_shared_module() const; |
| 352 bool is_theme() const; |
| 353 |
| 351 bool can_be_incognito_enabled() const; | 354 bool can_be_incognito_enabled() const; |
| 352 | 355 |
| 353 void AddWebExtentPattern(const URLPattern& pattern); | 356 void AddWebExtentPattern(const URLPattern& pattern); |
| 354 const URLPatternSet& web_extent() const { return extent_; } | 357 const URLPatternSet& web_extent() const { return extent_; } |
| 355 | 358 |
| 356 // Theme-related. | |
| 357 bool is_theme() const; | |
| 358 | |
| 359 private: | 359 private: |
| 360 friend class base::RefCountedThreadSafe<Extension>; | 360 friend class base::RefCountedThreadSafe<Extension>; |
| 361 | 361 |
| 362 // Chooses the extension ID for an extension based on a variety of criteria. | 362 // Chooses the extension ID for an extension based on a variety of criteria. |
| 363 // The chosen ID will be set in |manifest|. | 363 // The chosen ID will be set in |manifest|. |
| 364 static bool InitExtensionID(extensions::Manifest* manifest, | 364 static bool InitExtensionID(extensions::Manifest* manifest, |
| 365 const base::FilePath& path, | 365 const base::FilePath& path, |
| 366 const ExtensionId& explicit_id, | 366 const ExtensionId& explicit_id, |
| 367 int creation_flags, | 367 int creation_flags, |
| 368 base::string16* error); | 368 base::string16* error); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 569 |
| 570 UpdatedExtensionPermissionsInfo( | 570 UpdatedExtensionPermissionsInfo( |
| 571 const Extension* extension, | 571 const Extension* extension, |
| 572 const PermissionSet* permissions, | 572 const PermissionSet* permissions, |
| 573 Reason reason); | 573 Reason reason); |
| 574 }; | 574 }; |
| 575 | 575 |
| 576 } // namespace extensions | 576 } // namespace extensions |
| 577 | 577 |
| 578 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 578 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
| OLD | NEW |