summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/tracker_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/shared_impl/tracker_base.cc')
-rw-r--r--ppapi/shared_impl/tracker_base.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/ppapi/shared_impl/tracker_base.cc b/ppapi/shared_impl/tracker_base.cc
new file mode 100644
index 0000000..79c4b4e
--- /dev/null
+++ b/ppapi/shared_impl/tracker_base.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2011 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/shared_impl/tracker_base.h"
+
+#include "base/logging.h"
+
+namespace ppapi {
+namespace shared_impl {
+
+static TrackerBase* (*g_global_getter)() = NULL;
+
+// static
+void TrackerBase::Init(TrackerBase* (*getter)()) {
+ g_global_getter = getter;
+}
+
+// static
+TrackerBase* TrackerBase::Get() {
+ return g_global_getter();
+}
+
+} // namespace shared_impl
+} // namespace ppapi