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

Unified Diff: ui/events/devices/input_device_service.cc

Issue 1992443002: Add Mojo IPC based input-device service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_ddm
Patch Set: Clean up/move files. Created 4 years, 7 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: ui/events/devices/input_device_service.cc
diff --git a/ui/events/devices/input_device_service.cc b/ui/events/devices/input_device_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d5ef1323956a92f5720f52803e1ede75c9621d4c
--- /dev/null
+++ b/ui/events/devices/input_device_service.cc
@@ -0,0 +1,25 @@
+// 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 "ui/events/devices/input_device_service.h"
+
+namespace ui {
+
+InputDeviceService* InputDeviceService::instance_ = nullptr;
+
+InputDeviceService* InputDeviceService::GetInstance() {
+ DCHECK(instance_);
+ return instance_;
+}
+
+void InputDeviceService::SetInstance(InputDeviceService* instance) {
+ DCHECK(!instance_);
+ instance_ = instance;
+}
+
+void InputDeviceService::ClearInstance() {
+ instance_ = nullptr;
+}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698