Index: gpu/ipc/common/android/dialog_surface_lookup.cc |
diff --git a/gpu/ipc/common/android/dialog_surface_lookup.cc b/gpu/ipc/common/android/dialog_surface_lookup.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f1ff8349cb7448f2bd1c8ed3ea21a71ef5fe5587 |
--- /dev/null |
+++ b/gpu/ipc/common/android/dialog_surface_lookup.cc |
@@ -0,0 +1,27 @@ |
+// Copyright 2016 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 "gpu/ipc/common/android/dialog_surface_lookup.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace gpu { |
+ |
+namespace { |
+DialogSurfaceLookup* g_instance = NULL; |
+} // anonymous namespace |
+ |
+// static |
+DialogSurfaceLookup* DialogSurfaceLookup::GetInstance() { |
+ DCHECK(g_instance); |
+ return g_instance; |
+} |
+ |
+// static |
+void DialogSurfaceLookup::InitInstance(DialogSurfaceLookup* lookup) { |
+ DCHECK(!g_instance || !lookup); |
+ g_instance = lookup; |
+} |
+ |
+} // namespace gpu |