| 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..61bab914353fbda773f0461181fcf3c3fb4b8d26
|
| --- /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_;
|
| +}
|
| +
|
| +// static
|
| +void InputDeviceManager::SetInstance(InputDeviceManager* instance) {
|
| + DCHECK(!instance_);
|
| + instance_ = instance;
|
| +}
|
| +
|
| +// static
|
| +void InputDeviceManager::ClearInstance() {
|
| + instance_ = nullptr;
|
| +}
|
| +
|
| +} // namespace ui
|
|
|