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

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

Issue 11442074: Lazy initialization for ExtensionInputMethodEventRouter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class ExtensionSyncData; 45 class ExtensionSyncData;
46 class ExtensionToolbarModel; 46 class ExtensionToolbarModel;
47 class GURL; 47 class GURL;
48 class Profile; 48 class Profile;
49 class Version; 49 class Version;
50 50
51 namespace base { 51 namespace base {
52 class SequencedTaskRunner; 52 class SequencedTaskRunner;
53 } 53 }
54 54
55 namespace chromeos {
56 class ExtensionInputMethodEventRouter;
57 }
58
59 namespace extensions { 55 namespace extensions {
60 class AppNotificationManager; 56 class AppNotificationManager;
61 class AppSyncData; 57 class AppSyncData;
62 class BrowserEventRouter; 58 class BrowserEventRouter;
63 class ComponentLoader; 59 class ComponentLoader;
64 class ContentSettingsStore; 60 class ContentSettingsStore;
65 class CrxInstaller; 61 class CrxInstaller;
66 class Extension; 62 class Extension;
67 class ExtensionActionStorageManager; 63 class ExtensionActionStorageManager;
68 class ExtensionSyncData; 64 class ExtensionSyncData;
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 extensions::MenuManager* menu_manager() { return &menu_manager_; } 545 extensions::MenuManager* menu_manager() { return &menu_manager_; }
550 546
551 extensions::AppNotificationManager* app_notification_manager() { 547 extensions::AppNotificationManager* app_notification_manager() {
552 return app_notification_manager_.get(); 548 return app_notification_manager_.get();
553 } 549 }
554 550
555 extensions::BrowserEventRouter* browser_event_router() { 551 extensions::BrowserEventRouter* browser_event_router() {
556 return browser_event_router_.get(); 552 return browser_event_router_.get();
557 } 553 }
558 554
559 #if defined(OS_CHROMEOS)
560 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() {
561 return input_method_event_router_.get();
562 }
563 #endif
564
565 // Notify the frontend that there was an error loading an extension. 555 // Notify the frontend that there was an error loading an extension.
566 // This method is public because UnpackedInstaller and InstalledLoader 556 // This method is public because UnpackedInstaller and InstalledLoader
567 // can post to here. 557 // can post to here.
568 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency 558 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency
569 // of these classes on ExtensionService. 559 // of these classes on ExtensionService.
570 void ReportExtensionLoadError(const FilePath& extension_path, 560 void ReportExtensionLoadError(const FilePath& extension_path,
571 const std::string& error, 561 const std::string& error,
572 bool be_noisy); 562 bool be_noisy);
573 563
574 // ExtensionHost of background page calls this method right after its render 564 // ExtensionHost of background page calls this method right after its render
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 // Keeps track of app notifications. 938 // Keeps track of app notifications.
949 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_; 939 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_;
950 940
951 // Flag to make sure event routers are only initialized once. 941 // Flag to make sure event routers are only initialized once.
952 bool event_routers_initialized_; 942 bool event_routers_initialized_;
953 943
954 // TODO(yoz): None of these should be owned by ExtensionService. 944 // TODO(yoz): None of these should be owned by ExtensionService.
955 // crbug.com/159265 945 // crbug.com/159265
956 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; 946 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_;
957 947
958 #if defined(OS_CHROMEOS)
959 scoped_ptr<chromeos::ExtensionInputMethodEventRouter>
960 input_method_event_router_;
961 #endif
962
963 // A collection of external extension providers. Each provider reads 948 // A collection of external extension providers. Each provider reads
964 // a source of external extension information. Examples include the 949 // a source of external extension information. Examples include the
965 // windows registry and external_extensions.json. 950 // windows registry and external_extensions.json.
966 extensions::ProviderCollection external_extension_providers_; 951 extensions::ProviderCollection external_extension_providers_;
967 952
968 // Set to true by OnExternalExtensionUpdateUrlFound() when an external 953 // Set to true by OnExternalExtensionUpdateUrlFound() when an external
969 // extension URL is found, and by CheckForUpdatesSoon() when an update check 954 // extension URL is found, and by CheckForUpdatesSoon() when an update check
970 // has to wait for the external providers. Used in 955 // has to wait for the external providers. Used in
971 // OnAllExternalProvidersReady() to determine if an update check is needed to 956 // OnAllExternalProvidersReady() to determine if an update check is needed to
972 // install pending extensions. 957 // install pending extensions.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 #endif 990 #endif
1006 991
1007 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 992 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1008 InstallAppsWithUnlimtedStorage); 993 InstallAppsWithUnlimtedStorage);
1009 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 994 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1010 InstallAppsAndCheckStorageProtection); 995 InstallAppsAndCheckStorageProtection);
1011 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 996 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1012 }; 997 };
1013 998
1014 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 999 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/input_method_event_router.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698