| OLD | NEW |
| 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(NULL, 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 Loading... |
| 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 |
| OLD | NEW |