| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "content/public/browser/browser_thread.h" | 44 #include "content/public/browser/browser_thread.h" |
| 45 #include "content/public/browser/notification_observer.h" | 45 #include "content/public/browser/notification_observer.h" |
| 46 #include "content/public/browser/notification_registrar.h" | 46 #include "content/public/browser/notification_registrar.h" |
| 47 #include "sync/api/sync_change.h" | 47 #include "sync/api/sync_change.h" |
| 48 #include "sync/api/syncable_service.h" | 48 #include "sync/api/syncable_service.h" |
| 49 | 49 |
| 50 class AppNotificationManager; | 50 class AppNotificationManager; |
| 51 class BookmarkExtensionEventRouter; | 51 class BookmarkExtensionEventRouter; |
| 52 class CrxInstaller; | 52 class CrxInstaller; |
| 53 class ExtensionBrowserEventRouter; | 53 class ExtensionBrowserEventRouter; |
| 54 class ExtensionErrorUI; |
| 54 class ExtensionFontSettingsEventRouter; | 55 class ExtensionFontSettingsEventRouter; |
| 55 class ExtensionGlobalError; | |
| 56 class ExtensionManagementEventRouter; | 56 class ExtensionManagementEventRouter; |
| 57 class ExtensionPreferenceEventRouter; | 57 class ExtensionPreferenceEventRouter; |
| 58 class ExtensionSyncData; | 58 class ExtensionSyncData; |
| 59 class ExtensionToolbarModel; | 59 class ExtensionToolbarModel; |
| 60 class HistoryExtensionEventRouter; | 60 class HistoryExtensionEventRouter; |
| 61 class GURL; | 61 class GURL; |
| 62 class PendingExtensionManager; | 62 class PendingExtensionManager; |
| 63 class Profile; | 63 class Profile; |
| 64 class Version; | 64 class Version; |
| 65 | 65 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 557 |
| 558 // Returns true when all the external extension providers are ready. | 558 // Returns true when all the external extension providers are ready. |
| 559 bool AreAllExternalProvidersReady() const; | 559 bool AreAllExternalProvidersReady() const; |
| 560 | 560 |
| 561 void OnAllExternalProvidersReady(); | 561 void OnAllExternalProvidersReady(); |
| 562 | 562 |
| 563 // Once all external providers are done, generates any needed alerts about | 563 // Once all external providers are done, generates any needed alerts about |
| 564 // extensions. | 564 // extensions. |
| 565 void IdentifyAlertableExtensions(); | 565 void IdentifyAlertableExtensions(); |
| 566 | 566 |
| 567 // Given an ExtensionGlobalError alert, populates it with any extensions that | 567 // Given an ExtensionErrorUI alert, populates it with any extensions that |
| 568 // need alerting. Returns true if the alert should be displayed at all. | 568 // need alerting. Returns true if the alert should be displayed at all. |
| 569 // | 569 // |
| 570 // This method takes the extension_global_error argument rather than using | 570 // This method takes the extension_error_ui argument rather than using |
| 571 // the member variable to make it easier to test the method in isolation. | 571 // the member variable to make it easier to test the method in isolation. |
| 572 bool PopulateExtensionGlobalError( | 572 bool PopulateExtensionErrorUI(ExtensionErrorUI* extension_error_ui); |
| 573 ExtensionGlobalError* extension_global_error); | |
| 574 | 573 |
| 575 // Marks alertable extensions as acknowledged, after the user presses the | 574 // Marks alertable extensions as acknowledged, after the user presses the |
| 576 // accept button. | 575 // accept button. |
| 577 void HandleExtensionAlertAccept(); | 576 void HandleExtensionAlertAccept(); |
| 578 | 577 |
| 579 // Given a (presumably just-installed) extension id, mark that extension as | 578 // Given a (presumably just-installed) extension id, mark that extension as |
| 580 // acknowledged. | 579 // acknowledged. |
| 581 void AcknowledgeExternalExtension(const std::string& id); | 580 void AcknowledgeExternalExtension(const std::string& id); |
| 582 | 581 |
| 583 // Opens the Extensions page because the user wants to get more details | 582 // Opens the Extensions page because the user wants to get more details |
| 584 // about the alerts. | 583 // about the alerts. |
| 585 void HandleExtensionAlertDetails(Browser* browser); | 584 void HandleExtensionAlertDetails(); |
| 586 | 585 |
| 587 // Called when the extension alert is closed. | 586 // Called when the extension alert is closed. |
| 588 void HandleExtensionAlertClosed(); | 587 void HandleExtensionAlertClosed(); |
| 589 | 588 |
| 590 // content::NotificationObserver | 589 // content::NotificationObserver |
| 591 virtual void Observe(int type, | 590 virtual void Observe(int type, |
| 592 const content::NotificationSource& source, | 591 const content::NotificationSource& source, |
| 593 const content::NotificationDetails& details) OVERRIDE; | 592 const content::NotificationDetails& details) OVERRIDE; |
| 594 | 593 |
| 595 // Whether there are any apps installed. Component apps are not included. | 594 // Whether there are any apps installed. Component apps are not included. |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 844 |
| 846 // Contains an entry for each warning that shall be currently shown. | 845 // Contains an entry for each warning that shall be currently shown. |
| 847 ExtensionWarningSet extension_warnings_; | 846 ExtensionWarningSet extension_warnings_; |
| 848 | 847 |
| 849 scoped_ptr<extensions::APIResourceController> api_resource_controller_; | 848 scoped_ptr<extensions::APIResourceController> api_resource_controller_; |
| 850 | 849 |
| 851 extensions::ProcessMap process_map_; | 850 extensions::ProcessMap process_map_; |
| 852 | 851 |
| 853 AppShortcutManager app_shortcut_manager_; | 852 AppShortcutManager app_shortcut_manager_; |
| 854 | 853 |
| 855 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 854 scoped_ptr<ExtensionErrorUI> extension_error_ui_; |
| 856 | 855 |
| 857 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 858 InstallAppsWithUnlimtedStorage); | 857 InstallAppsWithUnlimtedStorage); |
| 859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 858 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 860 InstallAppsAndCheckStorageProtection); | 859 InstallAppsAndCheckStorageProtection); |
| 861 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 860 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 862 }; | 861 }; |
| 863 | 862 |
| 864 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 863 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |