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

Side by Side Diff: webkit/plugins/ppapi/ppapi_interface_factory.h

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, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/plugin_object.cc ('k') | webkit/plugins/ppapi/ppapi_interface_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_INTERFACE_FACTORY_H_
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_INTERFACE_FACTORY_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/lazy_instance.h"
13 #include "webkit/plugins/webkit_plugins_export.h"
14
15 namespace webkit {
16 namespace ppapi {
17
18 // This class provides functionality to manage custom PPAPI interface
19 // factories.
20 class PpapiInterfaceFactoryManager {
21 public:
22 typedef const void* (InterfaceFactory)(const std::string& interface_name);
23
24 // Registers a custom PPAPI interface factory.
25 WEBKIT_PLUGINS_EXPORT void RegisterFactory(InterfaceFactory* factory);
26
27 // Unregisters the custom PPAPI interface factory passed in.
28 WEBKIT_PLUGINS_EXPORT void UnregisterFactory(InterfaceFactory* factory);
29
30 // Returns a pointer to the interface identified by the name passed in.
31 // Returns NULL if no factory handles this interface.
32 const void* GetInterface(const std::string& interface_name);
33
34 // Returns a pointer to the global instance of the
35 // PpapiInterfaceFactoryManager class.
36 WEBKIT_PLUGINS_EXPORT static PpapiInterfaceFactoryManager* GetInstance();
37
38 private:
39 friend struct base::DefaultLazyInstanceTraits<PpapiInterfaceFactoryManager>;
40
41 PpapiInterfaceFactoryManager();
42 ~PpapiInterfaceFactoryManager();
43
44 typedef std::vector<InterfaceFactory*> FactoryList;
45
46 // List of registered factories.
47 FactoryList interface_factory_list_;
48
49 DISALLOW_COPY_AND_ASSIGN(PpapiInterfaceFactoryManager);
50 };
51
52 } // namespace ppapi
53 } // namespace webkit
54
55 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_INTERFACE_FACTORY_H_
56
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_object.cc ('k') | webkit/plugins/ppapi/ppapi_interface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698