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 #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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 input_method_event_router_.reset( | 549 input_method_event_router_.reset( |
550 new chromeos::ExtensionInputMethodEventRouter); | 550 new chromeos::ExtensionInputMethodEventRouter); |
551 | 551 |
552 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); | 552 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); |
553 extensions::InputImeEventRouter::GetInstance()->Init(); | 553 extensions::InputImeEventRouter::GetInstance()->Init(); |
554 #endif // defined(OS_CHROMEOS) | 554 #endif // defined(OS_CHROMEOS) |
555 #endif // defined(ENABLE_EXTENSIONS) | 555 #endif // defined(ENABLE_EXTENSIONS) |
556 event_routers_initialized_ = true; | 556 event_routers_initialized_ = true; |
557 } | 557 } |
558 | 558 |
| 559 void ExtensionService::NotifyExtensionEventRoutersOnListenerAdded( |
| 560 const std::string& event_name) { |
| 561 if (bluetooth_event_router_.get()) |
| 562 bluetooth_event_router_->OnEventListenerAdded(event_name); |
| 563 } |
| 564 |
| 565 void ExtensionService::NotifyExtensionEventRoutersOnListenerRemoved( |
| 566 const std::string& event_name) { |
| 567 if (bluetooth_event_router_.get()) |
| 568 bluetooth_event_router_->OnEventListenerRemoved(event_name); |
| 569 } |
| 570 |
559 void ExtensionService::OnProfileSyncServiceShutdown() { | 571 void ExtensionService::OnProfileSyncServiceShutdown() { |
560 // TODO(akalin): Move this block to Shutdown() once | 572 // TODO(akalin): Move this block to Shutdown() once |
561 // http://crbug.com/153827 is fixed. | 573 // http://crbug.com/153827 is fixed. |
562 if (push_messaging_event_router_.get()) | 574 if (push_messaging_event_router_.get()) |
563 push_messaging_event_router_->Shutdown(); | 575 push_messaging_event_router_->Shutdown(); |
564 } | 576 } |
565 | 577 |
566 void ExtensionService::Shutdown() { | 578 void ExtensionService::Shutdown() { |
567 // Do nothing for now. | 579 // Do nothing for now. |
568 } | 580 } |
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2954 | 2966 |
2955 return true; | 2967 return true; |
2956 } | 2968 } |
2957 | 2969 |
2958 bool ExtensionService::IsExtensionIdle(const std::string& extension_id) const { | 2970 bool ExtensionService::IsExtensionIdle(const std::string& extension_id) const { |
2959 ExtensionProcessManager* pm = system_->process_manager(); | 2971 ExtensionProcessManager* pm = system_->process_manager(); |
2960 extensions::ExtensionHost* host = | 2972 extensions::ExtensionHost* host = |
2961 pm->GetBackgroundHostForExtension(extension_id); | 2973 pm->GetBackgroundHostForExtension(extension_id); |
2962 return !host; | 2974 return !host; |
2963 } | 2975 } |
OLD | NEW |