Index: ppapi/cpp/internal_module.cc |
diff --git a/ppapi/cpp/internal_module.cc b/ppapi/cpp/internal_module.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f2c33e879826ddfa6d0fb71f39abdbadc5bb417b |
--- /dev/null |
+++ b/ppapi/cpp/internal_module.cc |
@@ -0,0 +1,21 @@ |
+// Copyright (c) 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. |
+ |
+#include "ppapi/cpp/internal_module.h" |
+#include "ppapi/cpp/module.h" |
+ |
+namespace pp { |
+namespace { |
+static Module* g_module_singleton; |
dmichael (off chromium)
2014/07/18 18:08:37
Would it be overkill to explicitly initialize to N
|
+} // namespace |
+ |
+Module* Module::Get() { |
+ return g_module_singleton; |
+} |
+ |
+void InternalSetModuleSingleton(Module* module) { |
+ g_module_singleton = module; |
+} |
+ |
+} // namespace pp |
dmichael (off chromium)
2014/07/18 18:08:37
It seems like you could put this in ppapi/cpp/priv
teravest
2014/07/28 18:40:08
Done.
|