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

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

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 years 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/touch/touch_observer_hud.h ('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/ash_switches.h" 7 #include "ash/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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 display_info_list_.push_back(internal_display_info_); 111 display_info_list_.push_back(internal_display_info_);
112 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_); 112 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
113 } 113 }
114 114
115 void AddExternalDisplay() { 115 void AddExternalDisplay() {
116 DCHECK_EQ(1U, display_info_list_.size()); 116 DCHECK_EQ(1U, display_info_list_.size());
117 display_info_list_.push_back(external_display_info_); 117 display_info_list_.push_back(external_display_info_);
118 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_); 118 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
119 } 119 }
120 120
121 int64 internal_display_id() const { 121 int64_t internal_display_id() const { return internal_display_id_; }
122 return internal_display_id_;
123 }
124 122
125 int64 external_display_id() const { 123 int64_t external_display_id() const { return external_display_id_; }
126 return external_display_id_;
127 }
128 124
129 protected: 125 protected:
130 DisplayManager* GetDisplayManager() { 126 DisplayManager* GetDisplayManager() {
131 return Shell::GetInstance()->display_manager(); 127 return Shell::GetInstance()->display_manager();
132 } 128 }
133 129
134 WindowTreeHostManager* GetWindowTreeHostManager() { 130 WindowTreeHostManager* GetWindowTreeHostManager() {
135 return Shell::GetInstance()->window_tree_host_manager(); 131 return Shell::GetInstance()->window_tree_host_manager();
136 } 132 }
137 133
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 RootWindowController* GetPrimaryRootController() { 172 RootWindowController* GetPrimaryRootController() {
177 aura::Window* root = GetPrimaryRootWindow(); 173 aura::Window* root = GetPrimaryRootWindow();
178 return GetRootWindowController(root); 174 return GetRootWindowController(root);
179 } 175 }
180 176
181 RootWindowController* GetSecondaryRootController() { 177 RootWindowController* GetSecondaryRootController() {
182 aura::Window* root = GetSecondaryRootWindow(); 178 aura::Window* root = GetSecondaryRootWindow();
183 return GetRootWindowController(root); 179 return GetRootWindowController(root);
184 } 180 }
185 181
186 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { 182 DisplayInfo CreateDisplayInfo(int64_t id, const gfx::Rect& bounds) {
187 DisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), false); 183 DisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), false);
188 info.SetBounds(bounds); 184 info.SetBounds(bounds);
189 return info; 185 return info;
190 } 186 }
191 187
192 aura::Window* GetRootWindowForTouchHud(TouchObserverHUD* hud) { 188 aura::Window* GetRootWindowForTouchHud(TouchObserverHUD* hud) {
193 return hud->root_window_; 189 return hud->root_window_;
194 } 190 }
195 191
196 views::Widget* GetWidgetForTouchHud(TouchObserverHUD* hud) { 192 views::Widget* GetWidgetForTouchHud(TouchObserverHUD* hud) {
197 return hud->widget_; 193 return hud->widget_;
198 } 194 }
199 195
200 int64 internal_display_id_; 196 int64_t internal_display_id_;
201 int64 external_display_id_; 197 int64_t external_display_id_;
202 int64 mirrored_display_id_; 198 int64_t mirrored_display_id_;
203 DisplayInfo internal_display_info_; 199 DisplayInfo internal_display_info_;
204 DisplayInfo external_display_info_; 200 DisplayInfo external_display_info_;
205 DisplayInfo mirrored_display_info_; 201 DisplayInfo mirrored_display_info_;
206 202
207 std::vector<DisplayInfo> display_info_list_; 203 std::vector<DisplayInfo> display_info_list_;
208 204
209 DISALLOW_COPY_AND_ASSIGN(TouchHudTestBase); 205 DISALLOW_COPY_AND_ASSIGN(TouchHudTestBase);
210 }; 206 };
211 207
212 class TouchHudDebugTest : public TouchHudTestBase { 208 class TouchHudDebugTest : public TouchHudTestBase {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 581
586 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); 582 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
587 EXPECT_EQ(1, GetInternalTouchPointsCount()); 583 EXPECT_EQ(1, GetInternalTouchPointsCount());
588 584
589 // Disabling projection touch HUD shoud remove it without crashing. 585 // Disabling projection touch HUD shoud remove it without crashing.
590 DisableTouchHudProjection(); 586 DisableTouchHudProjection();
591 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); 587 EXPECT_EQ(NULL, GetInternalTouchHudProjection());
592 } 588 }
593 589
594 } // namespace ash 590 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.h ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698