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_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 virtual bool OnExternalExtensionFileFound( | 474 virtual bool OnExternalExtensionFileFound( |
475 const std::string& id, | 475 const std::string& id, |
476 const base::Version* version, | 476 const base::Version* version, |
477 const base::FilePath& path, | 477 const base::FilePath& path, |
478 extensions::Manifest::Location location, | 478 extensions::Manifest::Location location, |
479 int creation_flags, | 479 int creation_flags, |
480 bool mark_acknowledged) OVERRIDE; | 480 bool mark_acknowledged) OVERRIDE; |
481 | 481 |
482 virtual bool OnExternalExtensionUpdateUrlFound( | 482 virtual bool OnExternalExtensionUpdateUrlFound( |
483 const std::string& id, | 483 const std::string& id, |
| 484 const std::string& install_parameter, |
484 const GURL& update_url, | 485 const GURL& update_url, |
485 extensions::Manifest::Location location, | 486 extensions::Manifest::Location location, |
486 int creation_flags, | 487 int creation_flags, |
487 bool mark_acknowledged) OVERRIDE; | 488 bool mark_acknowledged) OVERRIDE; |
488 | 489 |
489 virtual void OnExternalProviderReady( | 490 virtual void OnExternalProviderReady( |
490 const extensions::ExternalProviderInterface* provider) OVERRIDE; | 491 const extensions::ExternalProviderInterface* provider) OVERRIDE; |
491 | 492 |
492 // Returns true when all the external extension providers are ready. | 493 // Returns true when all the external extension providers are ready. |
493 bool AreAllExternalProvidersReady() const; | 494 bool AreAllExternalProvidersReady() const; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 void TrackTerminatedExtension(const extensions::Extension* extension); | 612 void TrackTerminatedExtension(const extensions::Extension* extension); |
612 | 613 |
613 // Removes the extension with the given id from the list of | 614 // Removes the extension with the given id from the list of |
614 // terminated extensions if it is there. | 615 // terminated extensions if it is there. |
615 void UntrackTerminatedExtension(const std::string& id); | 616 void UntrackTerminatedExtension(const std::string& id); |
616 | 617 |
617 // Update preferences for a new or updated extension; notify observers that | 618 // Update preferences for a new or updated extension; notify observers that |
618 // the extension is installed, e.g., to update event handlers on background | 619 // the extension is installed, e.g., to update event handlers on background |
619 // pages; and perform other extension install tasks before calling | 620 // pages; and perform other extension install tasks before calling |
620 // AddExtension. | 621 // AddExtension. |
621 void AddNewOrUpdatedExtension( | 622 void AddNewOrUpdatedExtension(const extensions::Extension* extension, |
622 const extensions::Extension* extension, | 623 extensions::Extension::State initial_state, |
623 extensions::Extension::State initial_state, | 624 extensions::BlacklistState blacklist_state, |
624 extensions::BlacklistState blacklist_state, | 625 const syncer::StringOrdinal& page_ordinal, |
625 const syncer::StringOrdinal& page_ordinal); | 626 const std::string& install_parameter); |
626 | 627 |
627 // Handles sending notification that |extension| was loaded. | 628 // Handles sending notification that |extension| was loaded. |
628 void NotifyExtensionLoaded(const extensions::Extension* extension); | 629 void NotifyExtensionLoaded(const extensions::Extension* extension); |
629 | 630 |
630 // Handles sending notification that |extension| was unloaded. | 631 // Handles sending notification that |extension| was unloaded. |
631 void NotifyExtensionUnloaded( | 632 void NotifyExtensionUnloaded( |
632 const extensions::Extension* extension, | 633 const extensions::Extension* extension, |
633 extensions::UnloadedExtensionInfo::Reason reason); | 634 extensions::UnloadedExtensionInfo::Reason reason); |
634 | 635 |
635 // Common helper to finish installing the given extension. | 636 // Common helper to finish installing the given extension. |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 843 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
843 GreylistedExtensionDisabled); | 844 GreylistedExtensionDisabled); |
844 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 845 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
845 GreylistDontEnableManuallyDisabled); | 846 GreylistDontEnableManuallyDisabled); |
846 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 847 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
847 GreylistUnknownDontChange); | 848 GreylistUnknownDontChange); |
848 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 849 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
849 }; | 850 }; |
850 | 851 |
851 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 852 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |