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

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

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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/test/display_manager_test_api.cc ('k') | ash/touch/touch_transformer_controller.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_observer_hud.h" 5 #include "ash/touch/touch_observer_hud.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 RootWindowController* GetPrimaryRootController() { 169 RootWindowController* GetPrimaryRootController() {
170 aura::Window* root = GetPrimaryRootWindow(); 170 aura::Window* root = GetPrimaryRootWindow();
171 return GetRootWindowController(root); 171 return GetRootWindowController(root);
172 } 172 }
173 173
174 RootWindowController* GetSecondaryRootController() { 174 RootWindowController* GetSecondaryRootController() {
175 aura::Window* root = GetSecondaryRootWindow(); 175 aura::Window* root = GetSecondaryRootWindow();
176 return GetRootWindowController(root); 176 return GetRootWindowController(root);
177 } 177 }
178 178
179 DisplayInfo CreateDisplayInfo(int64_t id, const gfx::Rect& bounds) { 179 display::ManagedDisplayInfo CreateDisplayInfo(int64_t id,
180 DisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), false); 180 const gfx::Rect& bounds) {
181 display::ManagedDisplayInfo info(id, base::StringPrintf("x-%" PRId64, id),
182 false);
181 info.SetBounds(bounds); 183 info.SetBounds(bounds);
182 return info; 184 return info;
183 } 185 }
184 186
185 aura::Window* GetRootWindowForTouchHud(TouchObserverHUD* hud) { 187 aura::Window* GetRootWindowForTouchHud(TouchObserverHUD* hud) {
186 return hud->root_window_; 188 return hud->root_window_;
187 } 189 }
188 190
189 views::Widget* GetWidgetForTouchHud(TouchObserverHUD* hud) { 191 views::Widget* GetWidgetForTouchHud(TouchObserverHUD* hud) {
190 return hud->widget_; 192 return hud->widget_;
191 } 193 }
192 194
193 int64_t internal_display_id_; 195 int64_t internal_display_id_;
194 int64_t external_display_id_; 196 int64_t external_display_id_;
195 int64_t mirrored_display_id_; 197 int64_t mirrored_display_id_;
196 DisplayInfo internal_display_info_; 198 display::ManagedDisplayInfo internal_display_info_;
197 DisplayInfo external_display_info_; 199 display::ManagedDisplayInfo external_display_info_;
198 DisplayInfo mirrored_display_info_; 200 display::ManagedDisplayInfo mirrored_display_info_;
199 201
200 std::vector<DisplayInfo> display_info_list_; 202 std::vector<display::ManagedDisplayInfo> display_info_list_;
201 203
202 DISALLOW_COPY_AND_ASSIGN(TouchHudTestBase); 204 DISALLOW_COPY_AND_ASSIGN(TouchHudTestBase);
203 }; 205 };
204 206
205 class TouchHudDebugTest : public TouchHudTestBase { 207 class TouchHudDebugTest : public TouchHudTestBase {
206 public: 208 public:
207 TouchHudDebugTest() {} 209 TouchHudDebugTest() {}
208 ~TouchHudDebugTest() override {} 210 ~TouchHudDebugTest() override {}
209 211
210 void SetUp() override { 212 void SetUp() override {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 615
614 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); 616 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
615 EXPECT_EQ(1, GetInternalTouchPointsCount()); 617 EXPECT_EQ(1, GetInternalTouchPointsCount());
616 618
617 // Disabling projection touch HUD shoud remove it without crashing. 619 // Disabling projection touch HUD shoud remove it without crashing.
618 DisableTouchHudProjection(); 620 DisableTouchHudProjection();
619 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); 621 EXPECT_EQ(NULL, GetInternalTouchHudProjection());
620 } 622 }
621 623
622 } // namespace ash 624 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698