| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ash/touch/touch_hud_debug.h" | 5 #include "ash/touch/touch_hud_debug.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 return "C"; | 65 return "C"; |
| 66 default: | 66 default: |
| 67 break; | 67 break; |
| 68 } | 68 } |
| 69 return "?"; | 69 return "?"; |
| 70 } | 70 } |
| 71 | 71 |
| 72 int GetTrackingId(const ui::TouchEvent& event) { | 72 int GetTrackingId(const ui::TouchEvent& event) { |
| 73 if (!event.HasNativeEvent()) | 73 if (!event.HasNativeEvent()) |
| 74 return 0; | 74 return 0; |
| 75 #if defined(USE_XI2_MT) | 75 #if defined(USE_X11) |
| 76 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 76 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 77 double tracking_id; | 77 double tracking_id; |
| 78 if (manager->GetEventData(*event.native_event(), | 78 if (manager->GetEventData(*event.native_event(), |
| 79 ui::DeviceDataManagerX11::DT_TOUCH_TRACKING_ID, | 79 ui::DeviceDataManagerX11::DT_TOUCH_TRACKING_ID, |
| 80 &tracking_id)) { | 80 &tracking_id)) { |
| 81 return static_cast<int>(tracking_id); | 81 return static_cast<int>(tracking_id); |
| 82 } | 82 } |
| 83 #endif | 83 #endif |
| 84 return 0; | 84 return 0; |
| 85 } | 85 } |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 RootWindowController* controller) { | 479 RootWindowController* controller) { |
| 480 controller->set_touch_hud_debug(this); | 480 controller->set_touch_hud_debug(this); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void TouchHudDebug::UnsetHudForRootWindowController( | 483 void TouchHudDebug::UnsetHudForRootWindowController( |
| 484 RootWindowController* controller) { | 484 RootWindowController* controller) { |
| 485 controller->set_touch_hud_debug(NULL); | 485 controller->set_touch_hud_debug(NULL); |
| 486 } | 486 } |
| 487 | 487 |
| 488 } // namespace ash | 488 } // namespace ash |
| OLD | NEW |