| 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 return GetExtensionByIdInternal(id, true, include_disabled, false); | 532 return GetExtensionByIdInternal(id, true, include_disabled, false); |
| 529 } | 533 } |
| 530 | 534 |
| 531 void ExtensionService::Init() { | 535 void ExtensionService::Init() { |
| 532 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 536 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 533 | 537 |
| 534 DCHECK(!ready_); // Can't redo init. | 538 DCHECK(!ready_); // Can't redo init. |
| 535 DCHECK_EQ(extensions_.size(), 0u); | 539 DCHECK_EQ(extensions_.size(), 0u); |
| (...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 | 2556 |
| 2553 ExtensionService::NaClModuleInfoList::iterator | 2557 ExtensionService::NaClModuleInfoList::iterator |
| 2554 ExtensionService::FindNaClModule(const GURL& url) { | 2558 ExtensionService::FindNaClModule(const GURL& url) { |
| 2555 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2559 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2556 iter != nacl_module_list_.end(); ++iter) { | 2560 iter != nacl_module_list_.end(); ++iter) { |
| 2557 if (iter->url == url) | 2561 if (iter->url == url) |
| 2558 return iter; | 2562 return iter; |
| 2559 } | 2563 } |
| 2560 return nacl_module_list_.end(); | 2564 return nacl_module_list_.end(); |
| 2561 } | 2565 } |
| OLD | NEW |