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

Side by Side Diff: mojo/examples/pepper_container_app/plugin_module.h

Issue 178953003: Mojo container example for hosting Pepper plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2014 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 MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
6 #define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/native_library.h"
12 #include "base/scoped_native_library.h"
13 #include "ppapi/c/pp_module.h"
14 #include "ppapi/c/ppp.h"
15
16 namespace ppapi {
17 class CallbackTracker;
18 }
19
20 namespace mojo {
21 namespace examples {
22
23 class PluginInstance;
24
25 class PluginModule : public base::RefCounted<PluginModule> {
26 public:
27 PluginModule();
28
29 scoped_ptr<PluginInstance> CreateInstance();
30
31 const void* GetPluginInterface(const char* name) const;
32
33 PP_Module pp_module() const { return 1; }
34 ppapi::CallbackTracker* callback_tracker() { return callback_tracker_.get(); }
35
36 private:
37 friend class base::RefCounted<PluginModule>;
38
39 struct EntryPoints {
40 EntryPoints();
41
42 PP_GetInterface_Func get_interface;
43 PP_InitializeModule_Func initialize_module;
44 PP_ShutdownModule_Func shutdown_module; // Optional, may be NULL.
45 };
46
47 ~PluginModule();
48
49 void Initialize();
50
51 base::ScopedNativeLibrary plugin_module_;
52 EntryPoints entry_points_;
53 scoped_refptr<ppapi::CallbackTracker> callback_tracker_;
54
55 DISALLOW_COPY_AND_ASSIGN(PluginModule);
56 };
57
58 } // namespace examples
59 } // namespace mojo
60
61 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
OLDNEW
« no previous file with comments | « mojo/examples/pepper_container_app/plugin_instance.cc ('k') | mojo/examples/pepper_container_app/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698