OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "chrome/browser/extensions/pending_extension_manager.h" | 32 #include "chrome/browser/extensions/pending_extension_manager.h" |
33 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 33 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
34 #include "chrome/browser/prefs/pref_change_registrar.h" | 34 #include "chrome/browser/prefs/pref_change_registrar.h" |
35 #include "chrome/common/extensions/extension.h" | 35 #include "chrome/common/extensions/extension.h" |
36 #include "content/browser/browser_thread.h" | 36 #include "content/browser/browser_thread.h" |
37 #include "content/common/notification_observer.h" | 37 #include "content/common/notification_observer.h" |
38 #include "content/common/notification_registrar.h" | 38 #include "content/common/notification_registrar.h" |
39 #include "content/common/property_bag.h" | 39 #include "content/common/property_bag.h" |
40 | 40 |
41 class CrxInstaller; | 41 class CrxInstaller; |
| 42 class ExtensionBookmarkEventRouter; |
42 class ExtensionBrowserEventRouter; | 43 class ExtensionBrowserEventRouter; |
43 class ExtensionContentSettingsStore; | 44 class ExtensionContentSettingsStore; |
| 45 class ExtensionCookiesEventRouter; |
| 46 class ExtensionFileBrowserEventRouter; |
| 47 class ExtensionHistoryEventRouter; |
44 class ExtensionInstallUI; | 48 class ExtensionInstallUI; |
| 49 class ExtensionManagementEventRouter; |
45 class ExtensionPreferenceEventRouter; | 50 class ExtensionPreferenceEventRouter; |
46 class ExtensionServiceBackend; | 51 class ExtensionServiceBackend; |
47 struct ExtensionSyncData; | 52 struct ExtensionSyncData; |
48 class ExtensionToolbarModel; | 53 class ExtensionToolbarModel; |
49 class ExtensionUpdater; | 54 class ExtensionUpdater; |
| 55 class ExtensionWebNavigationEventRouter; |
50 class GURL; | 56 class GURL; |
51 class PendingExtensionManager; | 57 class PendingExtensionManager; |
52 class Profile; | 58 class Profile; |
53 class Version; | 59 class Version; |
54 | 60 |
55 // This is an interface class to encapsulate the dependencies that | 61 // This is an interface class to encapsulate the dependencies that |
56 // various classes have on ExtensionService. This allows easy mocking. | 62 // various classes have on ExtensionService. This allows easy mocking. |
57 class ExtensionServiceInterface { | 63 class ExtensionServiceInterface { |
58 public: | 64 public: |
59 // A function that returns true if the given extension should be | 65 // A function that returns true if the given extension should be |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // List of registered component extensions (see Extension::Location). | 696 // List of registered component extensions (see Extension::Location). |
691 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 697 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
692 RegisteredComponentExtensions component_extension_manifests_; | 698 RegisteredComponentExtensions component_extension_manifests_; |
693 | 699 |
694 // Manages the promotion of the web store. | 700 // Manages the promotion of the web store. |
695 AppsPromo apps_promo_; | 701 AppsPromo apps_promo_; |
696 | 702 |
697 // Flag to make sure event routers are only initialized once. | 703 // Flag to make sure event routers are only initialized once. |
698 bool event_routers_initialized_; | 704 bool event_routers_initialized_; |
699 | 705 |
| 706 scoped_ptr<ExtensionHistoryEventRouter> history_event_router_; |
| 707 |
700 scoped_ptr<ExtensionBrowserEventRouter> browser_event_router_; | 708 scoped_ptr<ExtensionBrowserEventRouter> browser_event_router_; |
701 | 709 |
702 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; | 710 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; |
703 | 711 |
| 712 scoped_ptr<ExtensionBookmarkEventRouter> bookmark_event_router_; |
| 713 |
| 714 scoped_ptr<ExtensionCookiesEventRouter> cookies_event_router_; |
| 715 |
| 716 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; |
| 717 |
| 718 scoped_ptr<ExtensionWebNavigationEventRouter> web_navigation_event_router_; |
| 719 |
| 720 #if defined(OS_CHROMEOS) |
| 721 scoped_ptr<ExtensionFileBrowserEventRouter> file_browser_event_router_; |
| 722 #endif |
| 723 |
704 // A collection of external extension providers. Each provider reads | 724 // A collection of external extension providers. Each provider reads |
705 // a source of external extension information. Examples include the | 725 // a source of external extension information. Examples include the |
706 // windows registry and external_extensions.json. | 726 // windows registry and external_extensions.json. |
707 ProviderCollection external_extension_providers_; | 727 ProviderCollection external_extension_providers_; |
708 | 728 |
709 // Set to true by OnExternalExtensionUpdateUrlFound() when an external | 729 // Set to true by OnExternalExtensionUpdateUrlFound() when an external |
710 // extension URL is found. Used in CheckForExternalUpdates() to see | 730 // extension URL is found. Used in CheckForExternalUpdates() to see |
711 // if an update check is needed to install pending extensions. | 731 // if an update check is needed to install pending extensions. |
712 bool external_extension_url_added_; | 732 bool external_extension_url_added_; |
713 | 733 |
714 NaClModuleInfoList nacl_module_list_; | 734 NaClModuleInfoList nacl_module_list_; |
715 | 735 |
716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
717 InstallAppsWithUnlimtedStorage); | 737 InstallAppsWithUnlimtedStorage); |
718 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 738 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
719 InstallAppsAndCheckStorageProtection); | 739 InstallAppsAndCheckStorageProtection); |
720 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 740 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
721 }; | 741 }; |
722 | 742 |
723 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 743 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |