OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/overview/window_selector.h" | 5 #include "ash/wm/overview/window_selector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 if (!observed_windows_.count(WmWindow::Get(params.receiver)) || | 522 if (!observed_windows_.count(WmWindow::Get(params.receiver)) || |
523 !observed_windows_.count(WmWindow::Get(params.new_parent))) { | 523 !observed_windows_.count(WmWindow::Get(params.new_parent))) { |
524 return; | 524 return; |
525 } | 525 } |
526 | 526 |
527 WmWindow* new_window = WmWindow::Get(params.target); | 527 WmWindow* new_window = WmWindow::Get(params.target); |
528 if (!IsSelectable(new_window)) | 528 if (!IsSelectable(new_window)) |
529 return; | 529 return; |
530 | 530 |
531 for (size_t i = 0; i < wm::kSwitchableWindowContainerIdsLength; ++i) { | 531 for (size_t i = 0; i < wm::kSwitchableWindowContainerIdsLength; ++i) { |
532 if (new_window->GetParent()->GetShellWindowId() == | 532 if (new_window->GetParent()->aura_window()->id() == |
533 wm::kSwitchableWindowContainerIds[i] && | 533 wm::kSwitchableWindowContainerIds[i] && |
534 !new_window->GetTransientParent()) { | 534 !new_window->GetTransientParent()) { |
535 // The new window is in one of the switchable containers, abort overview. | 535 // The new window is in one of the switchable containers, abort overview. |
536 CancelSelection(); | 536 CancelSelection(); |
537 return; | 537 return; |
538 } | 538 } |
539 } | 539 } |
540 } | 540 } |
541 | 541 |
542 void WindowSelector::OnWindowDestroying(aura::Window* window) { | 542 void WindowSelector::OnWindowDestroying(aura::Window* window) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 for (size_t i = 0; i <= grid_list_.size() && | 681 for (size_t i = 0; i <= grid_list_.size() && |
682 grid_list_[selected_grid_index_]->Move(direction, animate); | 682 grid_list_[selected_grid_index_]->Move(direction, animate); |
683 i++) { | 683 i++) { |
684 selected_grid_index_ = | 684 selected_grid_index_ = |
685 (selected_grid_index_ + display_direction + grid_list_.size()) % | 685 (selected_grid_index_ + display_direction + grid_list_.size()) % |
686 grid_list_.size(); | 686 grid_list_.size(); |
687 } | 687 } |
688 } | 688 } |
689 | 689 |
690 } // namespace ash | 690 } // namespace ash |
OLD | NEW |