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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
7
8 #include "base/observer_list.h"
9 #include "base/win/registry.h"
10 #include "ui/events/devices/input_device_event_observer.h"
11
12 namespace base {
13 template <typename T>
14 struct DefaultSingletonTraits;
15 }
16
17 namespace ui {
18 class EVENTS_DEVICES_EXPORT InputDeviceObserverWin {
sadrul 2017/05/10 01:38:32 Can this be an InputDeviceManager? e.g. class Inp
19 public:
20 static InputDeviceObserverWin* GetInstance();
21 ~InputDeviceObserverWin();
22
23 void AddObserver(InputDeviceEventObserver* observer);
24 void RemoveObserver(InputDeviceEventObserver* observer);
25
26 protected:
27 InputDeviceObserverWin();
28
29 private:
30 void OnRegistryKeyChanged(base::win::RegKey* key);
31 bool IsSlateModeEnabled(base::win::RegKey* key);
32 void NotifyObserversKeyboardDeviceConfigurationChanged();
33 void NotifyObserversTouchpadDeviceConfigurationChanged();
34
35 std::unique_ptr<base::win::RegKey> registry_key_;
36 base::ObserverList<InputDeviceEventObserver> observers_;
37 bool slate_mode_enabled_;
38
39 friend struct base::DefaultSingletonTraits<InputDeviceObserverWin>;
40
41 base::WeakPtrFactory<InputDeviceObserverWin> weak_factory_;
42
43 DISALLOW_COPY_AND_ASSIGN(InputDeviceObserverWin);
44 };
45
46 } // namespace ui
47
48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_OBSERVER_WIN_H_
OLDNEW
« 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