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

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

Issue 317393002: Fixed Ash.WindowSelector.TimeInOverview UMA metric reporting wrong time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased change Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm/overview/window_selector.h" 5 #include "ash/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/accessibility_delegate.h" 9 #include "ash/accessibility_delegate.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 91
92 WindowSelector::WindowSelector(const WindowList& windows, 92 WindowSelector::WindowSelector(const WindowList& windows,
93 WindowSelectorDelegate* delegate) 93 WindowSelectorDelegate* delegate)
94 : delegate_(delegate), 94 : delegate_(delegate),
95 restore_focus_window_(aura::client::GetFocusClient( 95 restore_focus_window_(aura::client::GetFocusClient(
96 Shell::GetPrimaryRootWindow())->GetFocusedWindow()), 96 Shell::GetPrimaryRootWindow())->GetFocusedWindow()),
97 ignore_activations_(false), 97 ignore_activations_(false),
98 overview_start_time_(base::Time::Now()),
98 selected_grid_index_(0) { 99 selected_grid_index_(0) {
99 DCHECK(delegate_); 100 DCHECK(delegate_);
100 Shell* shell = Shell::GetInstance(); 101 Shell* shell = Shell::GetInstance();
101 shell->OnOverviewModeStarting(); 102 shell->OnOverviewModeStarting();
102 103
103 if (restore_focus_window_) 104 if (restore_focus_window_)
104 restore_focus_window_->AddObserver(this); 105 restore_focus_window_->AddObserver(this);
105 106
106 const aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 107 const aura::Window::Windows root_windows = Shell::GetAllRootWindows();
107 size_t items = 0; 108 size_t items = 0;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // root window, identify it and call Move() on it to initialize the 366 // root window, identify it and call Move() on it to initialize the
366 // selection widget. 367 // selection widget.
367 // TODO(nsatragno): If there are more than two monitors, move between grids 368 // TODO(nsatragno): If there are more than two monitors, move between grids
368 // in the requested direction. 369 // in the requested direction.
369 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); 370 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size();
370 grid_list_[selected_grid_index_]->Move(direction); 371 grid_list_[selected_grid_index_]->Move(direction);
371 } 372 }
372 } 373 }
373 374
374 } // namespace ash 375 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698