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

Side by Side Diff: ash/display/root_window_transformers_unittest.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 | « no previous file | ash/display/window_tree_host_manager_unittest.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/display/root_window_transformers.h" 5 #include "ash/display/root_window_transformers.h"
6 6
7 #include "ash/display/display_info.h" 7 #include "ash/display/display_info.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/display/display_util.h" 9 #include "ash/display/display_util.h"
10 #include "ash/host/root_window_transformer.h" 10 #include "ash/host/root_window_transformer.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 target_root_ = target->GetRootWindow(); 52 target_root_ = target->GetRootWindow();
53 event->StopPropagation(); 53 event->StopPropagation();
54 } 54 }
55 55
56 void OnTouchEvent(ui::TouchEvent* event) override { 56 void OnTouchEvent(ui::TouchEvent* event) override {
57 aura::Window* target = static_cast<aura::Window*>(event->target()); 57 aura::Window* target = static_cast<aura::Window*>(event->target());
58 // Only record when the target is the background which covers 58 // Only record when the target is the background which covers
59 // entire root window. 59 // entire root window.
60 if (target->name() != kDesktopBackgroundView) 60 if (target->name() != kDesktopBackgroundView)
61 return; 61 return;
62 touch_radius_x_ = event->radius_x(); 62 touch_radius_x_ = event->pointer_details().radius_x();
63 touch_radius_y_ = event->radius_y(); 63 touch_radius_y_ = event->pointer_details().radius_y();
64 event->StopPropagation(); 64 event->StopPropagation();
65 } 65 }
66 66
67 void OnScrollEvent(ui::ScrollEvent* event) override { 67 void OnScrollEvent(ui::ScrollEvent* event) override {
68 aura::Window* target = static_cast<aura::Window*>(event->target()); 68 aura::Window* target = static_cast<aura::Window*>(event->target());
69 // Only record when the target is the background which covers 69 // Only record when the target is the background which covers
70 // entire root window. 70 // entire root window.
71 if (target->name() != kDesktopBackgroundView) 71 if (target->name() != kDesktopBackgroundView)
72 return; 72 return;
73 73
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // Y margin must be margin is (500 - 500/400 * 200) / 2 = 125. 412 // Y margin must be margin is (500 - 500/400 * 200) / 2 = 125.
413 EXPECT_EQ("0,125,0,125", transformer->GetHostInsets().ToString()); 413 EXPECT_EQ("0,125,0,125", transformer->GetHostInsets().ToString());
414 414
415 UpdateDisplay("200x400,500x500"); 415 UpdateDisplay("200x400,500x500");
416 // The aspect ratio is flipped, so X margin is now 125. 416 // The aspect ratio is flipped, so X margin is now 125.
417 transformer = CreateCurrentRootWindowTransformerForMirroring(); 417 transformer = CreateCurrentRootWindowTransformerForMirroring();
418 EXPECT_EQ("125,0,125,0", transformer->GetHostInsets().ToString()); 418 EXPECT_EQ("125,0,125,0", transformer->GetHostInsets().ToString());
419 } 419 }
420 420
421 } // namespace ash 421 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698