| 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 "ash/common/wm/window_cycle_list.h" | 5 #include "ash/common/wm/window_cycle_list.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/common/wm/mru_window_tracker.h" | 10 #include "ash/common/wm/mru_window_tracker.h" |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 496 |
| 497 void WindowCycleList::OnDisplayAdded(const display::Display& new_display) {} | 497 void WindowCycleList::OnDisplayAdded(const display::Display& new_display) {} |
| 498 | 498 |
| 499 void WindowCycleList::OnDisplayRemoved(const display::Display& old_display) {} | 499 void WindowCycleList::OnDisplayRemoved(const display::Display& old_display) {} |
| 500 | 500 |
| 501 void WindowCycleList::OnDisplayMetricsChanged(const display::Display& display, | 501 void WindowCycleList::OnDisplayMetricsChanged(const display::Display& display, |
| 502 uint32_t changed_metrics) { | 502 uint32_t changed_metrics) { |
| 503 if (cycle_ui_widget_ && | 503 if (cycle_ui_widget_ && |
| 504 display.id() == | 504 display.id() == |
| 505 display::Screen::GetScreen() | 505 display::Screen::GetScreen() |
| 506 ->GetDisplayNearestWindow(cycle_ui_widget_->GetNativeView()) | 506 ->GetDisplayNearestWindow(cycle_ui_widget_->GetNativeWindow()) |
| 507 .id() && | 507 .id() && |
| 508 (changed_metrics & (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION))) { | 508 (changed_metrics & (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION))) { |
| 509 Shell::Get()->window_cycle_controller()->CancelCycling(); | 509 Shell::Get()->window_cycle_controller()->CancelCycling(); |
| 510 // |this| is deleted. | 510 // |this| is deleted. |
| 511 return; | 511 return; |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool WindowCycleList::ShouldShowUi() { | 515 bool WindowCycleList::ShouldShowUi() { |
| 516 return windows_.size() > 1; | 516 return windows_.size() > 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 542 widget_rect.set_height(widget_height); | 542 widget_rect.set_height(widget_height); |
| 543 params.bounds = widget_rect; | 543 params.bounds = widget_rect; |
| 544 widget->Init(params); | 544 widget->Init(params); |
| 545 | 545 |
| 546 screen_observer_.Add(display::Screen::GetScreen()); | 546 screen_observer_.Add(display::Screen::GetScreen()); |
| 547 widget->Show(); | 547 widget->Show(); |
| 548 cycle_ui_widget_ = widget; | 548 cycle_ui_widget_ = widget; |
| 549 } | 549 } |
| 550 | 550 |
| 551 } // namespace ash | 551 } // namespace ash |
| OLD | NEW |