| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 class PendingExtensionManager; | 60 class PendingExtensionManager; |
| 61 class Profile; | 61 class Profile; |
| 62 class Version; | 62 class Version; |
| 63 | 63 |
| 64 namespace chromeos { | 64 namespace chromeos { |
| 65 class ExtensionBluetoothEventRouter; | 65 class ExtensionBluetoothEventRouter; |
| 66 class ExtensionInputMethodEventRouter; | 66 class ExtensionInputMethodEventRouter; |
| 67 } | 67 } |
| 68 | 68 |
| 69 namespace extensions { | 69 namespace extensions { |
| 70 class ExtensionBrowserEventRouter; | |
| 71 class ExtensionManagedModeEventRouter; | |
| 72 } | |
| 73 | |
| 74 namespace syncer { | |
| 75 class SyncData; | |
| 76 class SyncErrorFactory; | |
| 77 } | |
| 78 | |
| 79 namespace extensions { | |
| 80 class AppSyncData; | 70 class AppSyncData; |
| 81 class BrowserEventRouter; | 71 class BrowserEventRouter; |
| 82 class ComponentLoader; | 72 class ComponentLoader; |
| 83 class ContentSettingsStore; | 73 class ContentSettingsStore; |
| 84 class Extension; | 74 class Extension; |
| 85 class ExtensionCookiesEventRouter; | 75 class ExtensionCookiesEventRouter; |
| 76 class ExtensionManagedModeEventRouter; |
| 86 class ExtensionSyncData; | 77 class ExtensionSyncData; |
| 87 class ExtensionSystem; | 78 class ExtensionSystem; |
| 88 class ExtensionUpdater; | 79 class ExtensionUpdater; |
| 89 class SettingsFrontend; | 80 class SettingsFrontend; |
| 90 class WebNavigationEventRouter; | 81 class WebNavigationEventRouter; |
| 82 class WindowEventRouter; |
| 83 } |
| 84 |
| 85 namespace syncer { |
| 86 class SyncData; |
| 87 class SyncErrorFactory; |
| 91 } | 88 } |
| 92 | 89 |
| 93 // This is an interface class to encapsulate the dependencies that | 90 // This is an interface class to encapsulate the dependencies that |
| 94 // various classes have on ExtensionService. This allows easy mocking. | 91 // various classes have on ExtensionService. This allows easy mocking. |
| 95 class ExtensionServiceInterface : public syncer::SyncableService { | 92 class ExtensionServiceInterface : public syncer::SyncableService { |
| 96 public: | 93 public: |
| 97 // A function that returns true if the given extension should be | 94 // A function that returns true if the given extension should be |
| 98 // included and false if it should be filtered out. Identical to | 95 // included and false if it should be filtered out. Identical to |
| 99 // PendingExtensionInfo::ShouldAllowInstallPredicate. | 96 // PendingExtensionInfo::ShouldAllowInstallPredicate. |
| 100 typedef bool (*ExtensionFilter)(const extensions::Extension&); | 97 typedef bool (*ExtensionFilter)(const extensions::Extension&); |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 extensions::MenuManager* menu_manager() { return &menu_manager_; } | 495 extensions::MenuManager* menu_manager() { return &menu_manager_; } |
| 499 | 496 |
| 500 AppNotificationManager* app_notification_manager() { | 497 AppNotificationManager* app_notification_manager() { |
| 501 return app_notification_manager_.get(); | 498 return app_notification_manager_.get(); |
| 502 } | 499 } |
| 503 | 500 |
| 504 extensions::BrowserEventRouter* browser_event_router() { | 501 extensions::BrowserEventRouter* browser_event_router() { |
| 505 return browser_event_router_.get(); | 502 return browser_event_router_.get(); |
| 506 } | 503 } |
| 507 | 504 |
| 505 extensions::WindowEventRouter* window_event_router() { |
| 506 return window_event_router_.get(); |
| 507 } |
| 508 |
| 508 #if defined(OS_CHROMEOS) | 509 #if defined(OS_CHROMEOS) |
| 509 chromeos::ExtensionBluetoothEventRouter* bluetooth_event_router() { | 510 chromeos::ExtensionBluetoothEventRouter* bluetooth_event_router() { |
| 510 return bluetooth_event_router_.get(); | 511 return bluetooth_event_router_.get(); |
| 511 } | 512 } |
| 512 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() { | 513 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() { |
| 513 return input_method_event_router_.get(); | 514 return input_method_event_router_.get(); |
| 514 } | 515 } |
| 515 #endif | 516 #endif |
| 516 | 517 |
| 517 // Notify the frontend that there was an error loading an extension. | 518 // Notify the frontend that there was an error loading an extension. |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 // Manages the promotion of the web store. | 796 // Manages the promotion of the web store. |
| 796 AppsPromo apps_promo_; | 797 AppsPromo apps_promo_; |
| 797 | 798 |
| 798 // Flag to make sure event routers are only initialized once. | 799 // Flag to make sure event routers are only initialized once. |
| 799 bool event_routers_initialized_; | 800 bool event_routers_initialized_; |
| 800 | 801 |
| 801 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; | 802 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; |
| 802 | 803 |
| 803 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; | 804 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; |
| 804 | 805 |
| 806 scoped_ptr<extensions::WindowEventRouter> window_event_router_; |
| 807 |
| 805 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; | 808 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; |
| 806 | 809 |
| 807 scoped_ptr<BookmarkExtensionEventRouter> bookmark_event_router_; | 810 scoped_ptr<BookmarkExtensionEventRouter> bookmark_event_router_; |
| 808 | 811 |
| 809 scoped_ptr<extensions::ExtensionCookiesEventRouter> cookies_event_router_; | 812 scoped_ptr<extensions::ExtensionCookiesEventRouter> cookies_event_router_; |
| 810 | 813 |
| 811 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; | 814 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; |
| 812 | 815 |
| 813 scoped_ptr<extensions::WebNavigationEventRouter> web_navigation_event_router_; | 816 scoped_ptr<extensions::WebNavigationEventRouter> web_navigation_event_router_; |
| 814 | 817 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 scoped_ptr<ExtensionErrorUI> extension_error_ui_; | 853 scoped_ptr<ExtensionErrorUI> extension_error_ui_; |
| 851 | 854 |
| 852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 855 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 853 InstallAppsWithUnlimtedStorage); | 856 InstallAppsWithUnlimtedStorage); |
| 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 857 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 855 InstallAppsAndCheckStorageProtection); | 858 InstallAppsAndCheckStorageProtection); |
| 856 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 859 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 857 }; | 860 }; |
| 858 | 861 |
| 859 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 862 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |