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

Side by Side Diff: ui/events/devices/input_device_manager.h

Issue 1992443002: Add Mojo IPC based input-device service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_ddm
Patch Set: Rebase/move. Created 4 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_ 5 #ifndef UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_
6 #define UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_ 6 #define UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 InputDeviceManager() {} 24 InputDeviceManager() {}
25 25
26 static InputDeviceManager* GetInstance(); 26 static InputDeviceManager* GetInstance();
27 static bool HasInstance(); 27 static bool HasInstance();
28 28
29 virtual const std::vector<InputDevice>& GetKeyboardDevices() const = 0; 29 virtual const std::vector<InputDevice>& GetKeyboardDevices() const = 0;
30 virtual const std::vector<TouchscreenDevice>& GetTouchscreenDevices() 30 virtual const std::vector<TouchscreenDevice>& GetTouchscreenDevices()
31 const = 0; 31 const = 0;
32 virtual const std::vector<InputDevice>& GetMouseDevices() const = 0; 32 virtual const std::vector<InputDevice>& GetMouseDevices() const = 0;
33 virtual const std::vector<InputDevice>& GetTouchpadDevices() const = 0; 33 virtual const std::vector<InputDevice>& GetTouchpadDevices() const = 0;
34
34 virtual bool AreDeviceListsComplete() const = 0; 35 virtual bool AreDeviceListsComplete() const = 0;
35
36 virtual bool AreTouchscreensEnabled() const = 0; 36 virtual bool AreTouchscreensEnabled() const = 0;
37 37
38 virtual void AddObserver(InputDeviceEventObserver* observer) = 0; 38 virtual void AddObserver(InputDeviceEventObserver* observer) = 0;
39 virtual void RemoveObserver(InputDeviceEventObserver* observer) = 0; 39 virtual void RemoveObserver(InputDeviceEventObserver* observer) = 0;
40 40
41 protected: 41 protected:
42 // Sets the instance. This should only be set once per process. 42 // Sets the instance. This should only be set once per process.
43 static void SetInstance(InputDeviceManager* instance); 43 static void SetInstance(InputDeviceManager* instance);
44 44
45 // Clears the instance. InputDeviceManager doesn't own the instance and won't 45 // Clears the instance. InputDeviceManager doesn't own the instance and won't
46 // destroy it, so it should be cleared before it is destroyed elsewhere. 46 // destroy it, so it should be cleared before it is destroyed elsewhere.
47 static void ClearInstance(); 47 static void ClearInstance();
48 48
49 private: 49 private:
50 static InputDeviceManager* instance_; // Not owned. 50 static InputDeviceManager* instance_; // Not owned.
51 51
52 DISALLOW_COPY_AND_ASSIGN(InputDeviceManager); 52 DISALLOW_COPY_AND_ASSIGN(InputDeviceManager);
53 }; 53 };
54 54
55 } // namespace ui 55 } // namespace ui
56 56
57 #endif // UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_ 57 #endif // UI_EVENTS_DEVICES_INPUT_DEVICE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698