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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: mojo/examples/pepper_container_app/plugin_module.h
diff --git a/mojo/examples/pepper_container_app/plugin_module.h b/mojo/examples/pepper_container_app/plugin_module.h
new file mode 100644
index 0000000000000000000000000000000000000000..05aad3b1a652c0b99859457a67eebb61b614e85c
--- /dev/null
+++ b/mojo/examples/pepper_container_app/plugin_module.h
@@ -0,0 +1,61 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
+#define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/native_library.h"
+#include "base/scoped_native_library.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/ppp.h"
+
+namespace ppapi {
+class CallbackTracker;
+}
+
+namespace mojo {
+namespace examples {
+
+class PluginInstance;
+
+class PluginModule : public base::RefCounted<PluginModule> {
+ public:
+ PluginModule();
+
+ scoped_ptr<PluginInstance> CreateInstance();
+
+ const void* GetPluginInterface(const char* name) const;
+
+ PP_Module pp_module() const { return 1; }
+ ppapi::CallbackTracker* callback_tracker() { return callback_tracker_.get(); }
+
+ private:
+ friend class base::RefCounted<PluginModule>;
+
+ struct EntryPoints {
+ EntryPoints();
+
+ PP_GetInterface_Func get_interface;
+ PP_InitializeModule_Func initialize_module;
+ PP_ShutdownModule_Func shutdown_module; // Optional, may be NULL.
+ };
+
+ ~PluginModule();
+
+ void Initialize();
+
+ base::ScopedNativeLibrary plugin_module_;
+ EntryPoints entry_points_;
+ scoped_refptr<ppapi::CallbackTracker> callback_tracker_;
+
+ DISALLOW_COPY_AND_ASSIGN(PluginModule);
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_PLUGIN_MODULE_H_
« 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