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

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

Issue 1300803003: Drop ui::TouchEvent shims for radius_{x,y} and force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 // A TouchPointLog represents a single touch-event of a touch point. 88 // A TouchPointLog represents a single touch-event of a touch point.
89 struct TouchPointLog { 89 struct TouchPointLog {
90 public: 90 public:
91 explicit TouchPointLog(const ui::TouchEvent& touch) 91 explicit TouchPointLog(const ui::TouchEvent& touch)
92 : id(touch.touch_id()), 92 : id(touch.touch_id()),
93 type(touch.type()), 93 type(touch.type()),
94 location(touch.root_location()), 94 location(touch.root_location()),
95 timestamp(touch.time_stamp().InMillisecondsF()), 95 timestamp(touch.time_stamp().InMillisecondsF()),
96 radius_x(touch.radius_x()), 96 radius_x(touch.pointer_details().radius_x()),
97 radius_y(touch.radius_y()), 97 radius_y(touch.pointer_details().radius_y()),
98 pressure(touch.force()), 98 pressure(touch.pointer_details().force()),
99 tracking_id(GetTrackingId(touch)), 99 tracking_id(GetTrackingId(touch)),
100 source_device(touch.source_device_id()) { 100 source_device(touch.source_device_id()) {}
101 }
102 101
103 // Populates a dictionary value with all the information about the touch 102 // Populates a dictionary value with all the information about the touch
104 // point. 103 // point.
105 scoped_ptr<base::DictionaryValue> GetAsDictionary() const { 104 scoped_ptr<base::DictionaryValue> GetAsDictionary() const {
106 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 105 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
107 106
108 value->SetInteger("id", id); 107 value->SetInteger("id", id);
109 value->SetString("type", std::string(GetTouchEventLabel(type))); 108 value->SetString("type", std::string(GetTouchEventLabel(type)));
110 value->SetString("location", location.ToString()); 109 value->SetString("location", location.ToString());
111 value->SetDouble("timestamp", timestamp); 110 value->SetDouble("timestamp", timestamp);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 RootWindowController* controller) { 469 RootWindowController* controller) {
471 controller->set_touch_hud_debug(this); 470 controller->set_touch_hud_debug(this);
472 } 471 }
473 472
474 void TouchHudDebug::UnsetHudForRootWindowController( 473 void TouchHudDebug::UnsetHudForRootWindowController(
475 RootWindowController* controller) { 474 RootWindowController* controller) {
476 controller->set_touch_hud_debug(NULL); 475 controller->set_touch_hud_debug(NULL);
477 } 476 }
478 477
479 } // namespace ash 478 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | ash/touch/touch_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698