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