Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 10696210: Making ExtensionService less dependent on Browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang build. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 ExtensionManagedModeEventRouter; 56 class ExtensionManagedModeEventRouter;
57 class ExtensionManagementEventRouter; 57 class ExtensionManagementEventRouter;
58 class ExtensionPreferenceEventRouter; 58 class ExtensionPreferenceEventRouter;
59 class ExtensionSyncData; 59 class ExtensionSyncData;
60 class ExtensionToolbarModel; 60 class ExtensionToolbarModel;
61 class HistoryExtensionEventRouter; 61 class HistoryExtensionEventRouter;
62 class GURL; 62 class GURL;
63 class PendingExtensionManager; 63 class PendingExtensionManager;
64 class Profile; 64 class Profile;
65 class Version; 65 class Version;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 // Returns true when all the external extension providers are ready. 555 // Returns true when all the external extension providers are ready.
556 bool AreAllExternalProvidersReady() const; 556 bool AreAllExternalProvidersReady() const;
557 557
558 void OnAllExternalProvidersReady(); 558 void OnAllExternalProvidersReady();
559 559
560 // Once all external providers are done, generates any needed alerts about 560 // Once all external providers are done, generates any needed alerts about
561 // extensions. 561 // extensions.
562 void IdentifyAlertableExtensions(); 562 void IdentifyAlertableExtensions();
563 563
564 // Given an ExtensionGlobalError alert, populates it with any extensions that 564 // Given an ExtensionErrorUI alert, populates it with any extensions that
565 // need alerting. Returns true if the alert should be displayed at all. 565 // need alerting. Returns true if the alert should be displayed at all.
566 // 566 //
567 // This method takes the extension_global_error argument rather than using 567 // This method takes the extension_error_ui argument rather than using
568 // the member variable to make it easier to test the method in isolation. 568 // the member variable to make it easier to test the method in isolation.
569 bool PopulateExtensionGlobalError( 569 bool PopulateExtensionErrorUI(ExtensionErrorUI* extension_error_ui);
570 ExtensionGlobalError* extension_global_error);
571 570
572 // Marks alertable extensions as acknowledged, after the user presses the 571 // Marks alertable extensions as acknowledged, after the user presses the
573 // accept button. 572 // accept button.
574 void HandleExtensionAlertAccept(); 573 void HandleExtensionAlertAccept();
575 574
576 // Given a (presumably just-installed) extension id, mark that extension as 575 // Given a (presumably just-installed) extension id, mark that extension as
577 // acknowledged. 576 // acknowledged.
578 void AcknowledgeExternalExtension(const std::string& id); 577 void AcknowledgeExternalExtension(const std::string& id);
579 578
580 // Opens the Extensions page because the user wants to get more details 579 // Opens the Extensions page because the user wants to get more details
581 // about the alerts. 580 // about the alerts.
582 void HandleExtensionAlertDetails(Browser* browser); 581 void HandleExtensionAlertDetails();
583 582
584 // Called when the extension alert is closed. 583 // Called when the extension alert is closed.
585 void HandleExtensionAlertClosed(); 584 void HandleExtensionAlertClosed();
586 585
587 // content::NotificationObserver 586 // content::NotificationObserver
588 virtual void Observe(int type, 587 virtual void Observe(int type,
589 const content::NotificationSource& source, 588 const content::NotificationSource& source,
590 const content::NotificationDetails& details) OVERRIDE; 589 const content::NotificationDetails& details) OVERRIDE;
591 590
592 // Whether there are any apps installed. Component apps are not included. 591 // Whether there are any apps installed. Component apps are not included.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 840
842 // Contains an entry for each warning that shall be currently shown. 841 // Contains an entry for each warning that shall be currently shown.
843 ExtensionWarningSet extension_warnings_; 842 ExtensionWarningSet extension_warnings_;
844 843
845 scoped_ptr<extensions::APIResourceController> api_resource_controller_; 844 scoped_ptr<extensions::APIResourceController> api_resource_controller_;
846 845
847 extensions::ProcessMap process_map_; 846 extensions::ProcessMap process_map_;
848 847
849 AppShortcutManager app_shortcut_manager_; 848 AppShortcutManager app_shortcut_manager_;
850 849
851 scoped_ptr<ExtensionGlobalError> extension_global_error_; 850 scoped_ptr<ExtensionErrorUI> extension_error_ui_;
852 851
853 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
854 InstallAppsWithUnlimtedStorage); 853 InstallAppsWithUnlimtedStorage);
855 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
856 InstallAppsAndCheckStorageProtection); 855 InstallAppsAndCheckStorageProtection);
857 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 856 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
858 }; 857 };
859 858
860 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 859 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698