| Index: ui/events/devices/input_device_observer_win.h
|
| diff --git a/ui/events/devices/input_device_observer_win.h b/ui/events/devices/input_device_observer_win.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4feeeb14f68e5f209df2372fd21f82291730cdd3
|
| --- /dev/null
|
| +++ b/ui/events/devices/input_device_observer_win.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright (c) 2017 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.
|
| +
|
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
|
| +#define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
|
| +
|
| +#include "base/observer_list.h"
|
| +#include "base/win/registry.h"
|
| +#include "ui/events/devices/input_device_event_observer.h"
|
| +
|
| +namespace base {
|
| +template <typename T>
|
| +struct DefaultSingletonTraits;
|
| +}
|
| +
|
| +namespace ui {
|
| +class EVENTS_DEVICES_EXPORT InputDeviceObserverWin {
|
| + public:
|
| + static InputDeviceObserverWin* GetInstance();
|
| + ~InputDeviceObserverWin();
|
| +
|
| + void AddObserver(InputDeviceEventObserver* observer);
|
| + void RemoveObserver(InputDeviceEventObserver* observer);
|
| +
|
| + protected:
|
| + InputDeviceObserverWin();
|
| +
|
| + private:
|
| + void OnRegistryKeyChanged(base::win::RegKey* key);
|
| + bool IsSlateModeEnabled(base::win::RegKey* key);
|
| + void NotifyObserversKeyboardDeviceConfigurationChanged();
|
| + void NotifyObserversMouseDeviceConfigurationChanged();
|
| + void NotifyObserversTouchpadDeviceConfigurationChanged();
|
| + void NotifyObserversTouchscreenDeviceConfigurationChanged();
|
| +
|
| + std::unique_ptr<base::win::RegKey> registry_key_;
|
| + base::ObserverList<InputDeviceEventObserver> observers_;
|
| + bool slate_mode_enabled_;
|
| +
|
| + friend struct base::DefaultSingletonTraits<InputDeviceObserverWin>;
|
| +
|
| + base::WeakPtrFactory<InputDeviceObserverWin> weak_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(InputDeviceObserverWin);
|
| +};
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
|
|
|