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

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

Issue 11442074: Lazy initialization for ExtensionInputMethodEventRouter (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 #include "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #include "grit/generated_resources.h" 109 #include "grit/generated_resources.h"
110 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 110 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
111 #include "sync/api/sync_change.h" 111 #include "sync/api/sync_change.h"
112 #include "sync/api/sync_error_factory.h" 112 #include "sync/api/sync_error_factory.h"
113 #include "webkit/database/database_tracker.h" 113 #include "webkit/database/database_tracker.h"
114 #include "webkit/database/database_util.h" 114 #include "webkit/database/database_util.h"
115 115
116 #if defined(OS_CHROMEOS) 116 #if defined(OS_CHROMEOS)
117 #include "chrome/browser/chromeos/cros/cros_library.h" 117 #include "chrome/browser/chromeos/cros/cros_library.h"
118 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 118 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
119 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
120 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 119 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
121 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 120 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
122 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" 121 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
123 #include "content/public/browser/storage_partition.h" 122 #include "content/public/browser/storage_partition.h"
124 #include "webkit/fileapi/file_system_context.h" 123 #include "webkit/fileapi/file_system_context.h"
125 #include "webkit/fileapi/file_system_mount_point_provider.h" 124 #include "webkit/fileapi/file_system_mount_point_provider.h"
126 #endif 125 #endif
127 126
128 using content::BrowserContext; 127 using content::BrowserContext;
129 using content::BrowserThread; 128 using content::BrowserThread;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 BookmarkModelFactory::GetForProfile(profile_))); 527 BookmarkModelFactory::GetForProfile(profile_)));
529 push_messaging_event_router_.reset( 528 push_messaging_event_router_.reset(
530 new extensions::PushMessagingEventRouter(profile_)); 529 new extensions::PushMessagingEventRouter(profile_));
531 media_galleries_private_event_router_.reset( 530 media_galleries_private_event_router_.reset(
532 new extensions::MediaGalleriesPrivateEventRouter(profile_)); 531 new extensions::MediaGalleriesPrivateEventRouter(profile_));
533 532
534 #if defined(OS_CHROMEOS) 533 #if defined(OS_CHROMEOS)
535 FileBrowserEventRouterFactory::GetForProfile( 534 FileBrowserEventRouterFactory::GetForProfile(
536 profile_)->ObserveFileSystemEvents(); 535 profile_)->ObserveFileSystemEvents();
537 536
538 input_method_event_router_.reset(
539 new chromeos::ExtensionInputMethodEventRouter);
540
541 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); 537 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_);
542 extensions::InputImeEventRouter::GetInstance()->Init(); 538 extensions::InputImeEventRouter::GetInstance()->Init();
543 #endif // defined(OS_CHROMEOS) 539 #endif // defined(OS_CHROMEOS)
544 #endif // defined(ENABLE_EXTENSIONS) 540 #endif // defined(ENABLE_EXTENSIONS)
545 event_routers_initialized_ = true; 541 event_routers_initialized_ = true;
546 } 542 }
547 543
548 void ExtensionService::OnProfileSyncServiceShutdown() { 544 void ExtensionService::OnProfileSyncServiceShutdown() {
549 // TODO(akalin): Move this block to Shutdown() once 545 // TODO(akalin): Move this block to Shutdown() once
550 // http://crbug.com/153827 is fixed. 546 // http://crbug.com/153827 is fixed.
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); 3152 scoped_refptr<const Extension> extension = GetInstalledExtension(*it);
3157 DCHECK(extension); 3153 DCHECK(extension);
3158 if (!extension) 3154 if (!extension)
3159 continue; 3155 continue;
3160 blacklisted_extensions_.Insert(extension); 3156 blacklisted_extensions_.Insert(extension);
3161 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); 3157 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST);
3162 } 3158 }
3163 3159
3164 IdentifyAlertableExtensions(); 3160 IdentifyAlertableExtensions();
3165 } 3161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698