| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/display/multi_display_manager.h" | 10 #include "ash/display/multi_display_manager.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 primary_root->SetProperty(internal::kDisplayIdKey, primary_display_id); | 462 primary_root->SetProperty(internal::kDisplayIdKey, primary_display_id); |
| 463 | 463 |
| 464 OnDisplayBoundsChanged( | 464 OnDisplayBoundsChanged( |
| 465 GetDisplayManager()->GetDisplayForId(primary_display_id)); | 465 GetDisplayManager()->GetDisplayForId(primary_display_id)); |
| 466 } | 466 } |
| 467 internal::RootWindowController* controller = | 467 internal::RootWindowController* controller = |
| 468 GetRootWindowController(root_to_delete); | 468 GetRootWindowController(root_to_delete); |
| 469 DCHECK(controller); | 469 DCHECK(controller); |
| 470 controller->MoveWindowsTo(GetPrimaryRootWindow()); | 470 controller->MoveWindowsTo(GetPrimaryRootWindow()); |
| 471 // Delete most of root window related objects, but don't delete | 471 // Delete most of root window related objects, but don't delete |
| 472 // root window itself yet because the stak may be using it. | 472 // root window itself yet because the stack may be using it. |
| 473 controller->Shutdown(); | 473 controller->Shutdown(); |
| 474 MessageLoop::current()->DeleteSoon(FROM_HERE, controller); | 474 MessageLoop::current()->DeleteSoon(FROM_HERE, controller); |
| 475 } | 475 } |
| 476 | 476 |
| 477 aura::RootWindow* DisplayController::AddRootWindowForDisplay( | 477 aura::RootWindow* DisplayController::AddRootWindowForDisplay( |
| 478 const gfx::Display& display) { | 478 const gfx::Display& display) { |
| 479 aura::RootWindow* root = | 479 aura::RootWindow* root = |
| 480 GetDisplayManager()->CreateRootWindowForDisplay(display); | 480 GetDisplayManager()->CreateRootWindowForDisplay(display); |
| 481 root_windows_[display.id()] = root; | 481 root_windows_[display.id()] = root; |
| 482 | 482 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 secondary_display->set_bounds( | 536 secondary_display->set_bounds( |
| 537 gfx::Rect(new_secondary_origin, secondary_bounds.size())); | 537 gfx::Rect(new_secondary_origin, secondary_bounds.size())); |
| 538 secondary_display->UpdateWorkAreaFromInsets(insets); | 538 secondary_display->UpdateWorkAreaFromInsets(insets); |
| 539 } | 539 } |
| 540 | 540 |
| 541 void DisplayController::NotifyDisplayConfigurationChanging() { | 541 void DisplayController::NotifyDisplayConfigurationChanging() { |
| 542 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging()); | 542 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging()); |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace ash | 545 } // namespace ash |
| OLD | NEW |