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

Side by Side Diff: ash/touch/touch_hud_debug.cc

Issue 706763003: x11: Always require XI2.2 for X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 6 years, 1 month 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 | « no previous file | ash/touch/touch_uma.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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/touch/touch_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698