| Index: ash/display/display_controller.cc
|
| diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
|
| index 43a6282d4573337473d3830f59f5230be6cccdad..35ae9d3ab5215cad0e37542a7dfa385629754f34 100644
|
| --- a/ash/display/display_controller.cc
|
| +++ b/ash/display/display_controller.cc
|
| @@ -547,6 +547,15 @@
|
| return GetDisplayManager()->UpdateWorkAreaOfDisplay(id, insets);
|
| }
|
|
|
| +void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
|
| + const DisplayInfo& display_info =
|
| + GetDisplayManager()->GetDisplayInfo(display.id());
|
| + DCHECK(!display_info.bounds_in_native().IsEmpty());
|
| + AshWindowTreeHost* ash_host = window_tree_hosts_[display.id()];
|
| + ash_host->AsWindowTreeHost()->SetBounds(display_info.bounds_in_native());
|
| + SetDisplayPropertiesOnHost(ash_host, display);
|
| +}
|
| +
|
| void DisplayController::OnDisplayAdded(const gfx::Display& display) {
|
| if (primary_tree_host_for_replace_) {
|
| DCHECK(window_tree_hosts_.empty());
|
| @@ -601,9 +610,8 @@
|
| GetRootWindowSettings(GetWindow(primary_host))->display_id =
|
| primary_display_id;
|
|
|
| - OnDisplayMetricsChanged(
|
| - GetDisplayManager()->GetDisplayForId(primary_display_id),
|
| - DISPLAY_METRIC_BOUNDS);
|
| + OnDisplayBoundsChanged(
|
| + GetDisplayManager()->GetDisplayForId(primary_display_id));
|
| }
|
| RootWindowController* controller =
|
| GetRootWindowController(GetWindow(host_to_delete));
|
| @@ -613,20 +621,6 @@
|
| // root window itself yet because the stack may be using it.
|
| controller->Shutdown();
|
| base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller);
|
| -}
|
| -
|
| -void DisplayController::OnDisplayMetricsChanged(const gfx::Display& display,
|
| - uint32_t metrics) {
|
| - if (!(metrics & (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION |
|
| - DISPLAY_METRIC_DEVICE_SCALE_FACTOR)))
|
| - return;
|
| -
|
| - const DisplayInfo& display_info =
|
| - GetDisplayManager()->GetDisplayInfo(display.id());
|
| - DCHECK(!display_info.bounds_in_native().IsEmpty());
|
| - AshWindowTreeHost* ash_host = window_tree_hosts_[display.id()];
|
| - ash_host->AsWindowTreeHost()->SetBounds(display_info.bounds_in_native());
|
| - SetDisplayPropertiesOnHost(ash_host, display);
|
| }
|
|
|
| void DisplayController::OnHostResized(const aura::WindowTreeHost* host) {
|
|
|