| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/ppapi_interface_factory.h" | 5 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 namespace webkit { | 11 namespace webkit { |
| 12 namespace ppapi { | 12 namespace ppapi { |
| 13 | 13 |
| 14 base::LazyInstance<PpapiInterfaceFactoryManager> | 14 base::LazyInstance<PpapiInterfaceFactoryManager> |
| 15 g_ppapi_interface_factory_manager(base::LINKER_INITIALIZED); | 15 g_ppapi_interface_factory_manager = LAZY_INSTANCE_INITIALIZER; |
| 16 | 16 |
| 17 PpapiInterfaceFactoryManager::PpapiInterfaceFactoryManager() { | 17 PpapiInterfaceFactoryManager::PpapiInterfaceFactoryManager() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 PpapiInterfaceFactoryManager::~PpapiInterfaceFactoryManager() { | 20 PpapiInterfaceFactoryManager::~PpapiInterfaceFactoryManager() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 void PpapiInterfaceFactoryManager::RegisterFactory(InterfaceFactory* factory) { | 23 void PpapiInterfaceFactoryManager::RegisterFactory(InterfaceFactory* factory) { |
| 24 DCHECK(std::find(interface_factory_list_.begin(), | 24 DCHECK(std::find(interface_factory_list_.begin(), |
| 25 interface_factory_list_.end(), factory) == | 25 interface_factory_list_.end(), factory) == |
| (...skipping 27 matching lines...) Expand all Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 // static | 55 // static |
| 56 PpapiInterfaceFactoryManager* PpapiInterfaceFactoryManager::GetInstance() { | 56 PpapiInterfaceFactoryManager* PpapiInterfaceFactoryManager::GetInstance() { |
| 57 return &g_ppapi_interface_factory_manager.Get(); | 57 return &g_ppapi_interface_factory_manager.Get(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace ppapi | 60 } // namespace ppapi |
| 61 } // namespace webkit | 61 } // namespace webkit |
| 62 | 62 |
| OLD | NEW |