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

Unified Diff: webkit/plugins/ppapi/ppapi_interface_factory.cc

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more more clang fun Created 7 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppapi_interface_factory.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_interface_factory.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_interface_factory.cc (revision 213561)
+++ webkit/plugins/ppapi/ppapi_interface_factory.cc (working copy)
@@ -1,62 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/plugins/ppapi/ppapi_interface_factory.h"
-
-#include <algorithm>
-
-#include "base/logging.h"
-
-namespace webkit {
-namespace ppapi {
-
-base::LazyInstance<PpapiInterfaceFactoryManager>
- g_ppapi_interface_factory_manager = LAZY_INSTANCE_INITIALIZER;
-
-PpapiInterfaceFactoryManager::PpapiInterfaceFactoryManager() {
-}
-
-PpapiInterfaceFactoryManager::~PpapiInterfaceFactoryManager() {
-}
-
-void PpapiInterfaceFactoryManager::RegisterFactory(InterfaceFactory* factory) {
- DCHECK(std::find(interface_factory_list_.begin(),
- interface_factory_list_.end(), factory) ==
- interface_factory_list_.end());
- interface_factory_list_.push_back(factory);
-}
-
-void PpapiInterfaceFactoryManager::UnregisterFactory(
- InterfaceFactory* factory) {
- FactoryList::iterator index =
- std::find(interface_factory_list_.begin(), interface_factory_list_.end(),
- factory);
- if (index != interface_factory_list_.end())
- interface_factory_list_.erase(index);
-}
-
-const void* PpapiInterfaceFactoryManager::GetInterface(
- const std::string& interface_name) {
- FactoryList::iterator index;
-
- const void* ppapi_interface = NULL;
-
- for (index = interface_factory_list_.begin();
- index != interface_factory_list_.end();
- ++index) {
- ppapi_interface = (*index)(interface_name);
- if (ppapi_interface)
- break;
- }
- return ppapi_interface;
-}
-
-// static
-PpapiInterfaceFactoryManager* PpapiInterfaceFactoryManager::GetInstance() {
- return &g_ppapi_interface_factory_manager.Get();
-}
-
-} // namespace ppapi
-} // namespace webkit
-
« no previous file with comments | « webkit/plugins/ppapi/ppapi_interface_factory.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698