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

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

Issue 889403003: Make PointerDeviceObserver work under Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DEVICE_DATA_MANAGER_H_ 5 #ifndef UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_
6 #define UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_ 6 #define UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 protected: 57 protected:
58 DeviceDataManager(); 58 DeviceDataManager();
59 59
60 static DeviceDataManager* instance(); 60 static DeviceDataManager* instance();
61 61
62 // DeviceHotplugEventObserver: 62 // DeviceHotplugEventObserver:
63 void OnTouchscreenDevicesUpdated( 63 void OnTouchscreenDevicesUpdated(
64 const std::vector<TouchscreenDevice>& devices) override; 64 const std::vector<TouchscreenDevice>& devices) override;
65 void OnKeyboardDevicesUpdated( 65 void OnKeyboardDevicesUpdated(
66 const std::vector<KeyboardDevice>& devices) override; 66 const std::vector<KeyboardDevice>& devices) override;
67 void OnMouseDevicesUpdated(
68 const std::vector<InputDevice>& devices) override;
69 void OnTouchpadDevicesUpdated(
70 const std::vector<InputDevice>& devices) override;
67 71
68 private: 72 private:
69 static DeviceDataManager* instance_; 73 static DeviceDataManager* instance_;
70 74
71 bool IsTouchDeviceIdValid(unsigned int touch_device_id) const; 75 bool IsTouchDeviceIdValid(unsigned int touch_device_id) const;
72 76
73 double touch_radius_scale_map_[kMaxDeviceNum]; 77 double touch_radius_scale_map_[kMaxDeviceNum];
74 78
75 // Table to keep track of which display id is mapped to which touch device. 79 // Table to keep track of which display id is mapped to which touch device.
76 int64_t touch_device_to_display_map_[kMaxDeviceNum]; 80 int64_t touch_device_to_display_map_[kMaxDeviceNum];
77 // Index table to find the TouchTransformer for a touch device. 81 // Index table to find the TouchTransformer for a touch device.
78 gfx::Transform touch_device_transformer_map_[kMaxDeviceNum]; 82 gfx::Transform touch_device_transformer_map_[kMaxDeviceNum];
79 83
80 std::vector<TouchscreenDevice> touchscreen_devices_; 84 std::vector<TouchscreenDevice> touchscreen_devices_;
81 std::vector<KeyboardDevice> keyboard_devices_; 85 std::vector<KeyboardDevice> keyboard_devices_;
82 86
83 ObserverList<InputDeviceEventObserver> observers_; 87 ObserverList<InputDeviceEventObserver> observers_;
84 88
85 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager); 89 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
86 }; 90 };
87 91
88 } // namespace ui 92 } // namespace ui
89 93
90 #endif // UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_ 94 #endif // UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698