Introduce new SPDY Version UMA histogram.
[chromium-blink-merge.git] / mojo / examples / pepper_container_app / plugin_module.h
blob05aad3b1a652c0b99859457a67eebb61b614e85c
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"
16 namespace ppapi {
17 class CallbackTracker;
20 namespace mojo {
21 namespace examples {
23 class PluginInstance;
25 class PluginModule : public base::RefCounted<PluginModule> {
26 public:
27 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(); }
36 private:
37 friend class base::RefCounted<PluginModule>;
39 struct EntryPoints {
40 EntryPoints();
42 PP_GetInterface_Func get_interface;
43 PP_InitializeModule_Func initialize_module;
44 PP_ShutdownModule_Func shutdown_module; // Optional, may be NULL.
47 ~PluginModule();
49 void Initialize();
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
59 } // namespace mojo
61 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_