OLD | NEW |
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_ash.h" | 10 #include "ash/screen_ash.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 } | 163 } |
164 | 164 |
165 const gfx::Display& GetInternalDisplay() { | 165 const gfx::Display& GetInternalDisplay() { |
166 return GetDisplayManager()->GetDisplayForId(internal_display_id_); | 166 return GetDisplayManager()->GetDisplayForId(internal_display_id_); |
167 } | 167 } |
168 | 168 |
169 const gfx::Display& GetExternalDisplay() { | 169 const gfx::Display& GetExternalDisplay() { |
170 return GetDisplayManager()->GetDisplayForId(external_display_id_); | 170 return GetDisplayManager()->GetDisplayForId(external_display_id_); |
171 } | 171 } |
172 | 172 |
173 aura::RootWindow* GetInternalRootWindow() { | 173 aura::Window* GetInternalRootWindow() { |
174 return GetDisplayController()->GetRootWindowForDisplayId( | 174 return GetDisplayController()->GetRootWindowForDisplayId( |
175 internal_display_id_); | 175 internal_display_id_); |
176 } | 176 } |
177 | 177 |
178 aura::RootWindow* GetExternalRootWindow() { | 178 aura::Window* GetExternalRootWindow() { |
179 return GetDisplayController()->GetRootWindowForDisplayId( | 179 return GetDisplayController()->GetRootWindowForDisplayId( |
180 external_display_id_); | 180 external_display_id_); |
181 } | 181 } |
182 | 182 |
183 aura::RootWindow* GetPrimaryRootWindow() { | 183 aura::Window* GetPrimaryRootWindow() { |
184 const gfx::Display& display = GetPrimaryDisplay(); | 184 const gfx::Display& display = GetPrimaryDisplay(); |
185 return GetDisplayController()->GetRootWindowForDisplayId(display.id()); | 185 return GetDisplayController()->GetRootWindowForDisplayId(display.id()); |
186 } | 186 } |
187 | 187 |
188 aura::RootWindow* GetSecondaryRootWindow() { | 188 aura::Window* GetSecondaryRootWindow() { |
189 const gfx::Display& display = GetSecondaryDisplay(); | 189 const gfx::Display& display = GetSecondaryDisplay(); |
190 return GetDisplayController()->GetRootWindowForDisplayId(display.id()); | 190 return GetDisplayController()->GetRootWindowForDisplayId(display.id()); |
191 } | 191 } |
192 | 192 |
193 internal::RootWindowController* GetInternalRootController() { | 193 internal::RootWindowController* GetInternalRootController() { |
194 aura::RootWindow* root = GetInternalRootWindow(); | 194 aura::Window* root = GetInternalRootWindow(); |
195 return GetRootWindowController(root); | 195 return GetRootWindowController(root); |
196 } | 196 } |
197 | 197 |
198 internal::RootWindowController* GetExternalRootController() { | 198 internal::RootWindowController* GetExternalRootController() { |
199 aura::RootWindow* root = GetExternalRootWindow(); | 199 aura::Window* root = GetExternalRootWindow(); |
200 return GetRootWindowController(root); | 200 return GetRootWindowController(root); |
201 } | 201 } |
202 | 202 |
203 internal::RootWindowController* GetPrimaryRootController() { | 203 internal::RootWindowController* GetPrimaryRootController() { |
204 aura::RootWindow* root = GetPrimaryRootWindow(); | 204 aura::Window* root = GetPrimaryRootWindow(); |
205 return GetRootWindowController(root); | 205 return GetRootWindowController(root); |
206 } | 206 } |
207 | 207 |
208 internal::RootWindowController* GetSecondaryRootController() { | 208 internal::RootWindowController* GetSecondaryRootController() { |
209 aura::RootWindow* root = GetSecondaryRootWindow(); | 209 aura::Window* root = GetSecondaryRootWindow(); |
210 return GetRootWindowController(root); | 210 return GetRootWindowController(root); |
211 } | 211 } |
212 | 212 |
213 internal::TouchObserverHUD* GetInternalTouchHud() { | 213 internal::TouchObserverHUD* GetInternalTouchHud() { |
214 return GetInternalRootController()->touch_hud_debug(); | 214 return GetInternalRootController()->touch_hud_debug(); |
215 } | 215 } |
216 | 216 |
217 internal::TouchObserverHUD* GetExternalTouchHud() { | 217 internal::TouchObserverHUD* GetExternalTouchHud() { |
218 return GetExternalRootController()->touch_hud_debug(); | 218 return GetExternalRootController()->touch_hud_debug(); |
219 } | 219 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // Add the internal display back. | 410 // Add the internal display back. |
411 AddInternalDisplay(); | 411 AddInternalDisplay(); |
412 | 412 |
413 // Check if the display's touch HUD is set correctly. | 413 // Check if the display's touch HUD is set correctly. |
414 EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id()); | 414 EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id()); |
415 CheckInternalDisplay(); | 415 CheckInternalDisplay(); |
416 } | 416 } |
417 | 417 |
418 } // namespace internal | 418 } // namespace internal |
419 } // namespace ash | 419 } // namespace ash |
OLD | NEW |