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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // | 386 // |
387 // |page_ordinal| is the location of the extension in the app launcher. | 387 // |page_ordinal| is the location of the extension in the app launcher. |
388 // |has_requirement_errors| is true if requirements of the extension weren't | 388 // |has_requirement_errors| is true if requirements of the extension weren't |
389 // met (for example graphics capabilities). | 389 // met (for example graphics capabilities). |
390 // |blacklist_state| will be BLACKLISTED if the extension is blacklisted. | 390 // |blacklist_state| will be BLACKLISTED if the extension is blacklisted. |
391 // |wait_for_idle| may be false to install the extension immediately. | 391 // |wait_for_idle| may be false to install the extension immediately. |
392 void OnExtensionInstalled( | 392 void OnExtensionInstalled( |
393 const extensions::Extension* extension, | 393 const extensions::Extension* extension, |
394 const syncer::StringOrdinal& page_ordinal, | 394 const syncer::StringOrdinal& page_ordinal, |
395 bool has_requirement_errors, | 395 bool has_requirement_errors, |
396 extensions::Blacklist::BlacklistState blacklist_state, | 396 extensions::BlacklistState blacklist_state, |
397 bool wait_for_idle); | 397 bool wait_for_idle); |
398 | 398 |
399 // Checks for delayed installation for all pending installs. | 399 // Checks for delayed installation for all pending installs. |
400 void MaybeFinishDelayedInstallations(); | 400 void MaybeFinishDelayedInstallations(); |
401 | 401 |
402 // Similar to FinishInstallation, but first checks if there still is an update | 402 // Similar to FinishInstallation, but first checks if there still is an update |
403 // pending for the extension, and makes sure the extension is still idle. | 403 // pending for the extension, and makes sure the extension is still idle. |
404 void MaybeFinishDelayedInstallation(const std::string& extension_id); | 404 void MaybeFinishDelayedInstallation(const std::string& extension_id); |
405 | 405 |
406 // Finishes installation of an update for an extension with the specified id, | 406 // Finishes installation of an update for an extension with the specified id, |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 // terminated extensions if it is there. | 648 // terminated extensions if it is there. |
649 void UntrackTerminatedExtension(const std::string& id); | 649 void UntrackTerminatedExtension(const std::string& id); |
650 | 650 |
651 // Update preferences for a new or updated extension; notify observers that | 651 // Update preferences for a new or updated extension; notify observers that |
652 // the extension is installed, e.g., to update event handlers on background | 652 // the extension is installed, e.g., to update event handlers on background |
653 // pages; and perform other extension install tasks before calling | 653 // pages; and perform other extension install tasks before calling |
654 // AddExtension. | 654 // AddExtension. |
655 void AddNewOrUpdatedExtension( | 655 void AddNewOrUpdatedExtension( |
656 const extensions::Extension* extension, | 656 const extensions::Extension* extension, |
657 extensions::Extension::State initial_state, | 657 extensions::Extension::State initial_state, |
658 extensions::Blacklist::BlacklistState blacklist_state, | 658 extensions::BlacklistState blacklist_state, |
659 const syncer::StringOrdinal& page_ordinal); | 659 const syncer::StringOrdinal& page_ordinal); |
660 | 660 |
661 // Handles sending notification that |extension| was loaded. | 661 // Handles sending notification that |extension| was loaded. |
662 void NotifyExtensionLoaded(const extensions::Extension* extension); | 662 void NotifyExtensionLoaded(const extensions::Extension* extension); |
663 | 663 |
664 // Handles sending notification that |extension| was unloaded. | 664 // Handles sending notification that |extension| was unloaded. |
665 void NotifyExtensionUnloaded( | 665 void NotifyExtensionUnloaded( |
666 const extensions::Extension* extension, | 666 const extensions::Extension* extension, |
667 extensions::UnloadedExtensionInfo::Reason reason); | 667 extensions::UnloadedExtensionInfo::Reason reason); |
668 | 668 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 #endif | 857 #endif |
858 | 858 |
859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
860 InstallAppsWithUnlimtedStorage); | 860 InstallAppsWithUnlimtedStorage); |
861 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 861 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
862 InstallAppsAndCheckStorageProtection); | 862 InstallAppsAndCheckStorageProtection); |
863 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 863 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
864 }; | 864 }; |
865 | 865 |
866 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 866 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |