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

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

Issue 2028593004: Add new InputDeviceManager interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_keyboard
Patch Set: Fix windows compile error. 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
« no previous file with comments | « ui/events/devices/input_device_manager.h ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/input_device_manager.cc
diff --git a/ui/events/devices/input_device_manager.cc b/ui/events/devices/input_device_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b6ca664e25a4f42bf7f4dcd015cf7583e73560b8
--- /dev/null
+++ b/ui/events/devices/input_device_manager.cc
@@ -0,0 +1,33 @@
+// 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_manager.h"
+
+namespace ui {
+
+InputDeviceManager* InputDeviceManager::instance_ = nullptr;
+
+// static
+InputDeviceManager* InputDeviceManager::GetInstance() {
+ DCHECK(instance_);
+ return instance_;
+}
+
+// static
+bool InputDeviceManager::HasInstance() {
+ return instance_ != nullptr;
+}
+
+// static
+void InputDeviceManager::SetInstance(InputDeviceManager* instance) {
+ DCHECK(!instance_);
+ instance_ = instance;
+}
+
+// static
+void InputDeviceManager::ClearInstance() {
+ instance_ = nullptr;
+}
+
+} // namespace ui
« no previous file with comments | « ui/events/devices/input_device_manager.h ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698