Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2111643004: [ash-md] Adjusts animation of the selector after closing an overview item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Adjusts animation of the selector after closing an overview item (comments) Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/wm/overview/window_selector.h" 5 #include "ash/common/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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 if (it != window_list.end()) { 469 if (it != window_list.end()) {
470 // Record 1-based index so that selecting a top MRU window will record 1. 470 // Record 1-based index so that selecting a top MRU window will record 1.
471 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.SelectionDepth", 471 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.SelectionDepth",
472 1 + it - window_list.begin()); 472 1 + it - window_list.begin());
473 } 473 }
474 } 474 }
475 475
476 window->GetWindowState()->Activate(); 476 window->GetWindowState()->Activate();
477 } 477 }
478 478
479 void WindowSelector::HideCurrentSelector() {
480 grid_list_[selected_grid_index_]->HideSelector();
481 }
482
479 bool WindowSelector::HandleKeyEvent(views::Textfield* sender, 483 bool WindowSelector::HandleKeyEvent(views::Textfield* sender,
480 const ui::KeyEvent& key_event) { 484 const ui::KeyEvent& key_event) {
481 if (key_event.type() != ui::ET_KEY_PRESSED) 485 if (key_event.type() != ui::ET_KEY_PRESSED)
482 return false; 486 return false;
483 487
484 switch (key_event.key_code()) { 488 switch (key_event.key_code()) {
485 case ui::VKEY_ESCAPE: 489 case ui::VKEY_ESCAPE:
486 CancelSelection(); 490 CancelSelection();
487 break; 491 break;
488 case ui::VKEY_UP: 492 case ui::VKEY_UP:
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 for (size_t i = 0; i <= grid_list_.size() && 691 for (size_t i = 0; i <= grid_list_.size() &&
688 grid_list_[selected_grid_index_]->Move(direction, animate); 692 grid_list_[selected_grid_index_]->Move(direction, animate);
689 i++) { 693 i++) {
690 selected_grid_index_ = 694 selected_grid_index_ =
691 (selected_grid_index_ + display_direction + grid_list_.size()) % 695 (selected_grid_index_ + display_direction + grid_list_.size()) %
692 grid_list_.size(); 696 grid_list_.size();
693 } 697 }
694 } 698 }
695 699
696 } // namespace ash 700 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698