| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 base::Bind(&WindowManager::OnDisplaysAquired, base::Unretained(this))); | 285 base::Bind(&WindowManager::OnDisplaysAquired, base::Unretained(this))); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void WindowManager::OnDisplaySnapshotsInvalidated() {} | 288 void WindowManager::OnDisplaySnapshotsInvalidated() {} |
| 289 | 289 |
| 290 void WindowManager::OnDisplaysAquired( | 290 void WindowManager::OnDisplaysAquired( |
| 291 const std::vector<display::DisplaySnapshot*>& displays) { | 291 const std::vector<display::DisplaySnapshot*>& displays) { |
| 292 windows_.clear(); | 292 windows_.clear(); |
| 293 | 293 |
| 294 gfx::Point origin; | 294 gfx::Point origin; |
| 295 for (auto display : displays) { | 295 for (auto* display : displays) { |
| 296 if (!display->native_mode()) { | 296 if (!display->native_mode()) { |
| 297 LOG(ERROR) << "Display " << display->display_id() | 297 LOG(ERROR) << "Display " << display->display_id() |
| 298 << " doesn't have a native mode"; | 298 << " doesn't have a native mode"; |
| 299 continue; | 299 continue; |
| 300 } | 300 } |
| 301 | 301 |
| 302 delegate_->Configure( | 302 delegate_->Configure( |
| 303 *display, display->native_mode(), origin, | 303 *display, display->native_mode(), origin, |
| 304 base::Bind(&WindowManager::OnDisplayConfigured, base::Unretained(this), | 304 base::Bind(&WindowManager::OnDisplayConfigured, base::Unretained(this), |
| 305 gfx::Rect(origin, display->native_mode()->size()))); | 305 gfx::Rect(origin, display->native_mode()->size()))); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 ->SetCurrentLayoutByName("us"); | 347 ->SetCurrentLayoutByName("us"); |
| 348 | 348 |
| 349 base::RunLoop run_loop; | 349 base::RunLoop run_loop; |
| 350 | 350 |
| 351 WindowManager window_manager(run_loop.QuitClosure()); | 351 WindowManager window_manager(run_loop.QuitClosure()); |
| 352 | 352 |
| 353 run_loop.Run(); | 353 run_loop.Run(); |
| 354 | 354 |
| 355 return 0; | 355 return 0; |
| 356 } | 356 } |
| OLD | NEW |