| 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/multi_display_manager.h" | 8 #include "ash/display/multi_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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 void DisplayController::InitSecondaryDisplays() { | 58 void DisplayController::InitSecondaryDisplays() { |
| 59 aura::DisplayManager* display_manager = | 59 aura::DisplayManager* display_manager = |
| 60 aura::Env::GetInstance()->display_manager(); | 60 aura::Env::GetInstance()->display_manager(); |
| 61 for (size_t i = 1; i < display_manager->GetNumDisplays(); ++i) { | 61 for (size_t i = 1; i < display_manager->GetNumDisplays(); ++i) { |
| 62 const gfx::Display* display = display_manager->GetDisplayAt(i); | 62 const gfx::Display* display = display_manager->GetDisplayAt(i); |
| 63 aura::RootWindow* root = AddRootWindowForDisplay(*display); | 63 aura::RootWindow* root = AddRootWindowForDisplay(*display); |
| 64 Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root); | 64 Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root); |
| 65 } | 65 } |
| 66 UpdateDisplayBoundsForLayout(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 aura::RootWindow* DisplayController::GetPrimaryRootWindow() { | 69 aura::RootWindow* DisplayController::GetPrimaryRootWindow() { |
| 69 DCHECK(!root_windows_.empty()); | 70 DCHECK(!root_windows_.empty()); |
| 70 return root_windows_[0]; | 71 return root_windows_[0]; |
| 71 } | 72 } |
| 72 | 73 |
| 73 aura::RootWindow* DisplayController::GetRootWindowForDisplayId(int id) { | 74 aura::RootWindow* DisplayController::GetRootWindowForDisplayId(int id) { |
| 74 return root_windows_[id]; | 75 return root_windows_[id]; |
| 75 } | 76 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 break; | 288 break; |
| 288 } | 289 } |
| 289 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); | 290 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); |
| 290 secondary_display->set_bounds( | 291 secondary_display->set_bounds( |
| 291 gfx::Rect(new_secondary_origin, secondary_bounds.size())); | 292 gfx::Rect(new_secondary_origin, secondary_bounds.size())); |
| 292 secondary_display->UpdateWorkAreaFromInsets(insets); | 293 secondary_display->UpdateWorkAreaFromInsets(insets); |
| 293 } | 294 } |
| 294 | 295 |
| 295 } // namespace internal | 296 } // namespace internal |
| 296 } // namespace ash | 297 } // namespace ash |
| OLD | NEW |