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

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

Issue 11496004: Lazy initialization for PushMessagingEventRouter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class CrxInstaller; 67 class CrxInstaller;
68 class Extension; 68 class Extension;
69 class ExtensionActionStorageManager; 69 class ExtensionActionStorageManager;
70 class ExtensionSyncData; 70 class ExtensionSyncData;
71 class ExtensionSystem; 71 class ExtensionSystem;
72 class ExtensionUpdater; 72 class ExtensionUpdater;
73 class FontSettingsEventRouter; 73 class FontSettingsEventRouter;
74 class MediaGalleriesPrivateEventRouter; 74 class MediaGalleriesPrivateEventRouter;
75 class PendingExtensionManager; 75 class PendingExtensionManager;
76 class PreferenceEventRouter; 76 class PreferenceEventRouter;
77 class PushMessagingEventRouter;
78 class SettingsFrontend; 77 class SettingsFrontend;
79 class WebNavigationEventRouter; 78 class WebNavigationEventRouter;
80 class WindowEventRouter; 79 class WindowEventRouter;
81 } 80 }
82 81
83 namespace syncer { 82 namespace syncer {
84 class SyncErrorFactory; 83 class SyncErrorFactory;
85 } 84 }
86 85
87 // This is an interface class to encapsulate the dependencies that 86 // This is an interface class to encapsulate the dependencies that
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // TODO(yoz): remove InitEventRoutersAterImport. 287 // TODO(yoz): remove InitEventRoutersAterImport.
289 void InitEventRoutersAfterImport(); 288 void InitEventRoutersAfterImport();
290 void RegisterForImportFinished(); 289 void RegisterForImportFinished();
291 290
292 // Complete some initialization after being notified that import has finished. 291 // Complete some initialization after being notified that import has finished.
293 void InitAfterImport(); 292 void InitAfterImport();
294 293
295 // Start up the extension event routers. 294 // Start up the extension event routers.
296 void InitEventRouters(); 295 void InitEventRouters();
297 296
298 // Called when the ProfileSyncService for the associated Profile is
299 // going to be destroyed. This is guaranteed to be called exactly
300 // once before Shutdown() is called.
301 //
302 // TODO(akalin): Remove this once http://crbug.com/153827 is fixed.
303 void OnProfileSyncServiceShutdown();
304
305 // Called when the associated Profile is going to be destroyed. 297 // Called when the associated Profile is going to be destroyed.
306 void Shutdown(); 298 void Shutdown();
307 299
308 // Look up an extension by ID. Does not include terminated 300 // Look up an extension by ID. Does not include terminated
309 // extensions. 301 // extensions.
310 virtual const extensions::Extension* GetExtensionById( 302 virtual const extensions::Extension* GetExtensionById(
311 const std::string& id, bool include_disabled) const OVERRIDE; 303 const std::string& id, bool include_disabled) const OVERRIDE;
312 304
313 enum IncludeFlag { 305 enum IncludeFlag {
314 INCLUDE_NONE = 0, 306 INCLUDE_NONE = 0,
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 extensions::WindowEventRouter* window_event_router() { 565 extensions::WindowEventRouter* window_event_router() {
574 return window_event_router_.get(); 566 return window_event_router_.get();
575 } 567 }
576 568
577 #if defined(OS_CHROMEOS) 569 #if defined(OS_CHROMEOS)
578 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() { 570 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() {
579 return input_method_event_router_.get(); 571 return input_method_event_router_.get();
580 } 572 }
581 #endif 573 #endif
582 574
583 extensions::PushMessagingEventRouter* push_messaging_event_router() {
584 return push_messaging_event_router_.get();
585 }
586
587 // Notify the frontend that there was an error loading an extension. 575 // Notify the frontend that there was an error loading an extension.
588 // This method is public because UnpackedInstaller and InstalledLoader 576 // This method is public because UnpackedInstaller and InstalledLoader
589 // can post to here. 577 // can post to here.
590 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency 578 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency
591 // of these classes on ExtensionService. 579 // of these classes on ExtensionService.
592 void ReportExtensionLoadError(const FilePath& extension_path, 580 void ReportExtensionLoadError(const FilePath& extension_path,
593 const std::string& error, 581 const std::string& error,
594 bool be_noisy); 582 bool be_noisy);
595 583
596 // ExtensionHost of background page calls this method right after its render 584 // ExtensionHost of background page calls this method right after its render
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 954
967 scoped_ptr<extensions::WindowEventRouter> window_event_router_; 955 scoped_ptr<extensions::WindowEventRouter> window_event_router_;
968 956
969 scoped_ptr<extensions::PreferenceEventRouter> preference_event_router_; 957 scoped_ptr<extensions::PreferenceEventRouter> preference_event_router_;
970 958
971 scoped_ptr<BookmarkExtensionEventRouter> bookmark_event_router_; 959 scoped_ptr<BookmarkExtensionEventRouter> bookmark_event_router_;
972 960
973 scoped_ptr<extensions::MediaGalleriesPrivateEventRouter> 961 scoped_ptr<extensions::MediaGalleriesPrivateEventRouter>
974 media_galleries_private_event_router_; 962 media_galleries_private_event_router_;
975 963
976 scoped_ptr<extensions::PushMessagingEventRouter>
977 push_messaging_event_router_;
978
979 scoped_ptr<extensions::WebNavigationEventRouter> web_navigation_event_router_; 964 scoped_ptr<extensions::WebNavigationEventRouter> web_navigation_event_router_;
980 965
981 scoped_ptr<extensions::FontSettingsEventRouter> font_settings_event_router_; 966 scoped_ptr<extensions::FontSettingsEventRouter> font_settings_event_router_;
982 967
983 #if defined(OS_CHROMEOS) 968 #if defined(OS_CHROMEOS)
984 scoped_ptr<chromeos::ExtensionInputMethodEventRouter> 969 scoped_ptr<chromeos::ExtensionInputMethodEventRouter>
985 input_method_event_router_; 970 input_method_event_router_;
986 #endif 971 #endif
987 972
988 // A collection of external extension providers. Each provider reads 973 // A collection of external extension providers. Each provider reads
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 #endif 1006 #endif
1022 1007
1023 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1008 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1024 InstallAppsWithUnlimtedStorage); 1009 InstallAppsWithUnlimtedStorage);
1025 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1010 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1026 InstallAppsAndCheckStorageProtection); 1011 InstallAppsAndCheckStorageProtection);
1027 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 1012 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1028 }; 1013 };
1029 1014
1030 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 1015 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698