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 "ui/views/corewm/focus_controller.h" | 5 #include "ui/views/corewm/focus_controller.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
9 #include "ui/views/corewm/focus_change_event.h" | 9 #include "ui/views/corewm/focus_change_event.h" |
10 #include "ui/views/corewm/focus_rules.h" | 10 #include "ui/views/corewm/focus_rules.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 void FocusController::DeactivateWindow(aura::Window* window) { | 86 void FocusController::DeactivateWindow(aura::Window* window) { |
87 FocusWindow(rules_->GetNextActivatableWindow(window)); | 87 FocusWindow(rules_->GetNextActivatableWindow(window)); |
88 } | 88 } |
89 | 89 |
90 aura::Window* FocusController::GetActiveWindow() { | 90 aura::Window* FocusController::GetActiveWindow() { |
91 return active_window_; | 91 return active_window_; |
92 } | 92 } |
93 | 93 |
| 94 aura::Window* FocusController::GetActivatableWindow(aura::Window* window) { |
| 95 return rules_->GetActivatableWindow(window); |
| 96 } |
| 97 |
94 bool FocusController::OnWillFocusWindow(aura::Window* window, | 98 bool FocusController::OnWillFocusWindow(aura::Window* window, |
95 const ui::Event* event) { | 99 const ui::Event* event) { |
96 NOTREACHED(); | 100 NOTREACHED(); |
97 return false; | 101 return false; |
98 } | 102 } |
99 | 103 |
100 bool FocusController::CanActivateWindow(aura::Window* window) const { | 104 bool FocusController::CanActivateWindow(aura::Window* window) const { |
101 return rules_->CanActivateWindow(window); | 105 return rules_->CanActivateWindow(window); |
102 } | 106 } |
103 | 107 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); | 217 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); |
214 } | 218 } |
215 } | 219 } |
216 | 220 |
217 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { | 221 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { |
218 FocusWindow(window); | 222 FocusWindow(window); |
219 } | 223 } |
220 | 224 |
221 } // namespace corewm | 225 } // namespace corewm |
222 } // namespace views | 226 } // namespace views |
OLD | NEW |