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

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

Issue 11368145: Lazy-creates BluetoothAdapter in ExtensionBluetoothEventRouter (EBEE). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GetMutableAdapter Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 input_method_event_router_.reset( 547 input_method_event_router_.reset(
548 new chromeos::ExtensionInputMethodEventRouter); 548 new chromeos::ExtensionInputMethodEventRouter);
549 549
550 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); 550 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_);
551 extensions::InputImeEventRouter::GetInstance()->Init(); 551 extensions::InputImeEventRouter::GetInstance()->Init();
552 #endif // defined(OS_CHROMEOS) 552 #endif // defined(OS_CHROMEOS)
553 #endif // defined(ENABLE_EXTENSIONS) 553 #endif // defined(ENABLE_EXTENSIONS)
554 event_routers_initialized_ = true; 554 event_routers_initialized_ = true;
555 } 555 }
556 556
557 void ExtensionService::NotifyExtensionEventRoutersOnListenerAdded(
558 const std::string& event_name) {
559 if (bluetooth_event_router_.get())
560 bluetooth_event_router_->OnEventListenerAdded(event_name);
561 }
562
563 void ExtensionService::NotifyExtensionEventRoutersOnListenerRemoved(
564 const std::string& event_name) {
565 if (bluetooth_event_router_.get())
566 bluetooth_event_router_->OnEventListenerRemoved(event_name);
567 }
568
557 void ExtensionService::OnProfileSyncServiceShutdown() { 569 void ExtensionService::OnProfileSyncServiceShutdown() {
558 // TODO(akalin): Move this block to Shutdown() once 570 // TODO(akalin): Move this block to Shutdown() once
559 // http://crbug.com/153827 is fixed. 571 // http://crbug.com/153827 is fixed.
560 if (push_messaging_event_router_.get()) 572 if (push_messaging_event_router_.get())
561 push_messaging_event_router_->Shutdown(); 573 push_messaging_event_router_->Shutdown();
562 } 574 }
563 575
564 void ExtensionService::Shutdown() { 576 void ExtensionService::Shutdown() {
565 // Do nothing for now. 577 // Do nothing for now.
566 } 578 }
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 2964
2953 return true; 2965 return true;
2954 } 2966 }
2955 2967
2956 bool ExtensionService::IsExtensionIdle(const std::string& extension_id) const { 2968 bool ExtensionService::IsExtensionIdle(const std::string& extension_id) const {
2957 ExtensionProcessManager* pm = system_->process_manager(); 2969 ExtensionProcessManager* pm = system_->process_manager();
2958 extensions::ExtensionHost* host = 2970 extensions::ExtensionHost* host =
2959 pm->GetBackgroundHostForExtension(extension_id); 2971 pm->GetBackgroundHostForExtension(extension_id);
2960 return !host; 2972 return !host;
2961 } 2973 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698