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

Side by Side Diff: ash/focus_cycler.cc

Issue 20708005: Refactor most recently used window tracking into a separate class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments. Created 7 years, 4 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 | « ash/ash.gyp ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/focus_cycler.h" 5 #include "ash/focus_cycler.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/mru_window_tracker.h"
8 #include "ash/wm/window_cycle_controller.h" 9 #include "ash/wm/window_cycle_controller.h"
9 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
10 #include "ui/aura/client/activation_client.h" 11 #include "ui/aura/client/activation_client.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 #include "ui/views/accessible_pane_view.h" 13 #include "ui/views/accessible_pane_view.h"
13 #include "ui/views/focus/focus_search.h" 14 #include "ui/views/focus/focus_search.h"
14 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
15 16
16 namespace ash { 17 namespace ash {
17 18
18 namespace { 19 namespace {
19 20
20 bool HasFocusableWindow() { 21 bool HasFocusableWindow() {
21 return !WindowCycleController::BuildWindowList(NULL, false).empty(); 22 return !MruWindowTracker::BuildWindowList(false).empty();
22 } 23 }
23 24
24 } // namespace 25 } // namespace
25 26
26 namespace internal { 27 namespace internal {
27 28
28 FocusCycler::FocusCycler() : widget_activating_(NULL) { 29 FocusCycler::FocusCycler() : widget_activating_(NULL) {
29 } 30 }
30 31
31 FocusCycler::~FocusCycler() { 32 FocusCycler::~FocusCycler() {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // will be taken care of by the widget activation. 106 // will be taken care of by the widget activation.
106 widget_activating_ = widget; 107 widget_activating_ = widget;
107 widget->Activate(); 108 widget->Activate();
108 widget_activating_ = NULL; 109 widget_activating_ = NULL;
109 return widget->IsActive(); 110 return widget->IsActive();
110 } 111 }
111 112
112 } // namespace internal 113 } // namespace internal
113 114
114 } // namespace ash 115 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698