Chromium Code Reviews| 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/wm/overview/window_grid.h" | 5 #include "ash/wm/overview/window_grid.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 (*iter)->RemoveWindow(window); | 301 (*iter)->RemoveWindow(window); |
| 302 | 302 |
| 303 // If there are still windows in this selector entry then the overview is | 303 // If there are still windows in this selector entry then the overview is |
| 304 // still active and the active selection remains the same. | 304 // still active and the active selection remains the same. |
| 305 if (!(*iter)->empty()) | 305 if (!(*iter)->empty()) |
| 306 return; | 306 return; |
| 307 | 307 |
| 308 size_t removed_index = iter - window_list_.begin(); | 308 size_t removed_index = iter - window_list_.begin(); |
| 309 window_list_.erase(iter); | 309 window_list_.erase(iter); |
| 310 | 310 |
| 311 window_selector_->on_window_removed(); | |
|
tdanderson
2014/06/09 17:50:45
Perhaps include a comment that this call is only f
Nina
2014/06/09 18:12:50
Done.
| |
| 312 | |
| 311 if (empty()) { | 313 if (empty()) { |
| 312 // If the grid is now empty, notify the window selector so that it erases us | 314 // If the grid is now empty, notify the window selector so that it erases us |
| 313 // from its grid list. | 315 // from its grid list. |
| 314 window_selector_->OnGridEmpty(this); | 316 window_selector_->OnGridEmpty(this); |
| 315 return; | 317 return; |
| 316 } | 318 } |
| 317 | 319 |
| 318 // If selecting, update the selection index. | 320 // If selecting, update the selection index. |
| 319 if (selection_widget_) { | 321 if (selection_widget_) { |
| 320 bool send_focus_alert = selected_index_ == removed_index; | 322 bool send_focus_alert = selected_index_ == removed_index; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 432 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 431 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 433 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 432 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); | 434 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); |
| 433 return; | 435 return; |
| 434 } | 436 } |
| 435 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 437 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 436 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); | 438 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); |
| 437 } | 439 } |
| 438 | 440 |
| 439 } // namespace ash | 441 } // namespace ash |
| OLD | NEW |