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.
5 #ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
6 #define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
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"
17 class CallbackTracker
;
25 class PluginModule
: public base::RefCounted
<PluginModule
> {
29 scoped_ptr
<PluginInstance
> CreateInstance();
31 const void* GetPluginInterface(const char* name
) const;
33 PP_Module
pp_module() const { return 1; }
34 ppapi::CallbackTracker
* callback_tracker() { return callback_tracker_
.get(); }
37 friend class base::RefCounted
<PluginModule
>;
42 PP_GetInterface_Func get_interface
;
43 PP_InitializeModule_Func initialize_module
;
44 PP_ShutdownModule_Func shutdown_module
; // Optional, may be NULL.
51 base::ScopedNativeLibrary plugin_module_
;
52 EntryPoints entry_points_
;
53 scoped_refptr
<ppapi::CallbackTracker
> callback_tracker_
;
55 DISALLOW_COPY_AND_ASSIGN(PluginModule
);
58 } // namespace examples
61 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_