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

Unified Diff: ui/events/devices/input_device_observer_win.h

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Nit fix Created 3 years, 8 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/BUILD.gn ('k') | ui/events/devices/input_device_observer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fd0f5b46abb84f0fa06d1c72f0d67b9bcd17b84f
--- /dev/null
+++ b/ui/events/devices/input_device_observer_win.h
@@ -0,0 +1,48 @@
+// Copyright 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 {
sadrul 2017/05/10 01:38:32 Can this be an InputDeviceManager? e.g. class Inp
+ 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 NotifyObserversTouchpadDeviceConfigurationChanged();
+
+ 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_
« no previous file with comments | « ui/events/devices/BUILD.gn ('k') | ui/events/devices/input_device_observer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698