| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 input_method_event_router_.reset( | 516 input_method_event_router_.reset( |
| 517 new chromeos::ExtensionInputMethodEventRouter); | 517 new chromeos::ExtensionInputMethodEventRouter); |
| 518 | 518 |
| 519 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); | 519 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); |
| 520 extensions::InputImeEventRouter::GetInstance()->Init(); | 520 extensions::InputImeEventRouter::GetInstance()->Init(); |
| 521 #endif | 521 #endif |
| 522 #endif // defined(ENABLE_EXTENSIONS) | 522 #endif // defined(ENABLE_EXTENSIONS) |
| 523 event_routers_initialized_ = true; | 523 event_routers_initialized_ = true; |
| 524 } | 524 } |
| 525 | 525 |
| 526 void ExtensionService::Shutdown() { |
| 527 push_messaging_event_router_->Shutdown(); |
| 528 } |
| 529 |
| 526 const Extension* ExtensionService::GetExtensionById( | 530 const Extension* ExtensionService::GetExtensionById( |
| 527 const std::string& id, bool include_disabled) const { | 531 const std::string& id, bool include_disabled) const { |
| 528 int include_mask = INCLUDE_ENABLED; | 532 int include_mask = INCLUDE_ENABLED; |
| 529 if (include_disabled) { | 533 if (include_disabled) { |
| 530 include_mask |= INCLUDE_DISABLED; | 534 include_mask |= INCLUDE_DISABLED; |
| 531 } | 535 } |
| 532 return GetExtensionByIdInternal(id, include_mask); | 536 return GetExtensionByIdInternal(id, include_mask); |
| 533 } | 537 } |
| 534 | 538 |
| 535 void ExtensionService::Init() { | 539 void ExtensionService::Init() { |
| (...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 | 2572 |
| 2569 ExtensionService::NaClModuleInfoList::iterator | 2573 ExtensionService::NaClModuleInfoList::iterator |
| 2570 ExtensionService::FindNaClModule(const GURL& url) { | 2574 ExtensionService::FindNaClModule(const GURL& url) { |
| 2571 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2575 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2572 iter != nacl_module_list_.end(); ++iter) { | 2576 iter != nacl_module_list_.end(); ++iter) { |
| 2573 if (iter->url == url) | 2577 if (iter->url == url) |
| 2574 return iter; | 2578 return iter; |
| 2575 } | 2579 } |
| 2576 return nacl_module_list_.end(); | 2580 return nacl_module_list_.end(); |
| 2577 } | 2581 } |
| OLD | NEW |