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

Side by Side Diff: chrome/renderer/chrome_ppapi_interfaces.cc

Issue 8440027: Change renderer_client interface for registering PPAPI Factories (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update other renderer_clients Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/renderer/chrome_ppapi_interfaces.h" 5 #include "chrome/renderer/chrome_ppapi_interfaces.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/rand_util_c.h" 9 #include "base/rand_util_c.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }; 81 };
82 82
83 const void* ChromePPAPIInterfaceFactory(const std::string& interface_name) { 83 const void* ChromePPAPIInterfaceFactory(const std::string& interface_name) {
84 if (interface_name == PPB_NACL_PRIVATE_INTERFACE) 84 if (interface_name == PPB_NACL_PRIVATE_INTERFACE)
85 return chrome::PPB_NaCl_Impl::GetInterface(); 85 return chrome::PPB_NaCl_Impl::GetInterface();
86 if (interface_name == PPB_PDF_INTERFACE) 86 if (interface_name == PPB_PDF_INTERFACE)
87 return chrome::PPB_PDF_Impl::GetInterface(); 87 return chrome::PPB_PDF_Impl::GetInterface();
88 return NULL; 88 return NULL;
89 } 89 }
90 90
91 void InitializePPAPI() {
92 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager =
93 webkit::ppapi::PpapiInterfaceFactoryManager::GetInstance();
94 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
95 }
96
97 void UninitializePPAPI() {
98 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager =
99 webkit::ppapi::PpapiInterfaceFactoryManager::GetInstance();
100 factory_manager->UnregisterFactory(ChromePPAPIInterfaceFactory);
101 }
102
103 } // namespace chrome 91 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_ppapi_interfaces.h ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698