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

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

Issue 313913004: Block internal PlatformEvents before they are dispatched in touchview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix updating cursor on enter notify. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/events/device_data_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DEVICE_DATA_MANAGER_H_ 5 #ifndef UI_EVENTS_DEVICE_DATA_MANAGER_H_
6 #define UI_EVENTS_DEVICE_DATA_MANAGER_H_ 6 #define UI_EVENTS_DEVICE_DATA_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ui/events/events_base_export.h" 12 #include "ui/events/events_base_export.h"
13 #include "ui/gfx/transform.h" 13 #include "ui/gfx/transform.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 // Keeps track of device mappings and event transformations. 17 // Keeps track of device mappings and event transformations.
18 class EVENTS_BASE_EXPORT DeviceDataManager { 18 class EVENTS_BASE_EXPORT DeviceDataManager {
19 public: 19 public:
20 virtual ~DeviceDataManager(); 20 virtual ~DeviceDataManager();
21 21
22 static void CreateInstance(); 22 static void CreateInstance();
23 static DeviceDataManager* GetInstance(); 23 static DeviceDataManager* GetInstance();
24 static bool HasInstance();
24 25
25 void ClearTouchTransformerRecord(); 26 void ClearTouchTransformerRecord();
26 void UpdateTouchInfoForDisplay(int64_t display_id, 27 void UpdateTouchInfoForDisplay(int64_t display_id,
27 int touch_device_id, 28 int touch_device_id,
28 const gfx::Transform& touch_transformer); 29 const gfx::Transform& touch_transformer);
29 void ApplyTouchTransformer(int touch_device_id, float* x, float* y); 30 void ApplyTouchTransformer(int touch_device_id, float* x, float* y);
30 int64_t GetDisplayForTouchDevice(int touch_device_id) const; 31 int64_t GetDisplayForTouchDevice(int touch_device_id) const;
31 32
32 protected: 33 protected:
33 DeviceDataManager(); 34 DeviceDataManager();
(...skipping 11 matching lines...) Expand all
45 int64_t touch_device_to_display_map_[kMaxDeviceNum]; 46 int64_t touch_device_to_display_map_[kMaxDeviceNum];
46 // Index table to find the TouchTransformer for a touch device. 47 // Index table to find the TouchTransformer for a touch device.
47 gfx::Transform touch_device_transformer_map_[kMaxDeviceNum]; 48 gfx::Transform touch_device_transformer_map_[kMaxDeviceNum];
48 49
49 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager); 50 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
50 }; 51 };
51 52
52 } // namespace ui 53 } // namespace ui
53 54
54 #endif // UI_EVENTS_DEVICE_DATA_MANAGER_H_ 55 #endif // UI_EVENTS_DEVICE_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/events/device_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698