OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/display_info.h" | 8 #include "ash/display/display_info.h" |
9 #include "ash/display/display_layout_store.h" | 9 #include "ash/display/display_layout_store.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 virtual void PreInit() OVERRIDE { | 231 virtual void PreInit() OVERRIDE { |
232 Shell::GetInstance()->display_controller()->AddObserver(this); | 232 Shell::GetInstance()->display_controller()->AddObserver(this); |
233 } | 233 } |
234 | 234 |
235 // ash::DisplayController::Observer: | 235 // ash::DisplayController::Observer: |
236 virtual void OnDisplaysInitialized() OVERRIDE { | 236 virtual void OnDisplaysInitialized() OVERRIDE { |
237 DCHECK(!displays_initialized_); | 237 DCHECK(!displays_initialized_); |
238 displays_initialized_ = true; | 238 displays_initialized_ = true; |
239 } | 239 } |
240 | 240 |
241 const bool displays_initialized() const { | 241 bool displays_initialized() const { |
242 return displays_initialized_; | 242 return displays_initialized_; |
243 } | 243 } |
244 | 244 |
245 private: | 245 private: |
246 bool displays_initialized_; | 246 bool displays_initialized_; |
247 | 247 |
248 DISALLOW_COPY_AND_ASSIGN(StartupHelper); | 248 DISALLOW_COPY_AND_ASSIGN(StartupHelper); |
249 }; | 249 }; |
250 | 250 |
251 class DisplayControllerStartupTest : public test::AshTestBase { | 251 class DisplayControllerStartupTest : public test::AshTestBase { |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); | 1334 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); |
1335 | 1335 |
1336 // Switching back to single display. | 1336 // Switching back to single display. |
1337 UpdateDisplay("300x400"); | 1337 UpdateDisplay("300x400"); |
1338 EXPECT_EQ("aura_root_0", GetXWindowName( | 1338 EXPECT_EQ("aura_root_0", GetXWindowName( |
1339 Shell::GetPrimaryRootWindow()->GetHost())); | 1339 Shell::GetPrimaryRootWindow()->GetHost())); |
1340 } | 1340 } |
1341 #endif | 1341 #endif |
1342 | 1342 |
1343 } // namespace ash | 1343 } // namespace ash |
OLD | NEW |