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/wm/activation_controller.h" | 5 #include "ash/wm/activation_controller.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/activation_controller_delegate.h" | 10 #include "ash/wm/activation_controller_delegate.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 void ActivationController::DeactivateWindow(aura::Window* window) { | 204 void ActivationController::DeactivateWindow(aura::Window* window) { |
205 if (window) | 205 if (window) |
206 ActivateNextWindow(window); | 206 ActivateNextWindow(window); |
207 } | 207 } |
208 | 208 |
209 aura::Window* ActivationController::GetActiveWindow() { | 209 aura::Window* ActivationController::GetActiveWindow() { |
210 return active_window_; | 210 return active_window_; |
211 } | 211 } |
212 | 212 |
| 213 aura::Window* ActivationController::GetActivatableWindow(aura::Window* window) { |
| 214 return GetActivatableWindow(window, NULL); |
| 215 } |
| 216 |
213 bool ActivationController::OnWillFocusWindow(aura::Window* window, | 217 bool ActivationController::OnWillFocusWindow(aura::Window* window, |
214 const ui::Event* event) { | 218 const ui::Event* event) { |
215 return CanActivateWindowWithEvent( | 219 return CanActivateWindowWithEvent( |
216 GetActivatableWindow(window, event), event, CURRENT_VISIBILITY); | 220 GetActivatableWindow(window, event), event, CURRENT_VISIBILITY); |
217 } | 221 } |
218 | 222 |
219 //////////////////////////////////////////////////////////////////////////////// | 223 //////////////////////////////////////////////////////////////////////////////// |
220 // ActivationController, aura::WindowObserver implementation: | 224 // ActivationController, aura::WindowObserver implementation: |
221 | 225 |
222 void ActivationController::OnWindowVisibilityChanged(aura::Window* window, | 226 void ActivationController::OnWindowVisibilityChanged(aura::Window* window, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 aura::Window* window = static_cast<aura::Window*>(event->target()); | 421 aura::Window* window = static_cast<aura::Window*>(event->target()); |
418 window = delegate_->WillFocusWindow(window); | 422 window = delegate_->WillFocusWindow(window); |
419 if (GetActiveWindow() != window) { | 423 if (GetActiveWindow() != window) { |
420 aura::client::GetFocusClient(window)->FocusWindow( | 424 aura::client::GetFocusClient(window)->FocusWindow( |
421 FindFocusableWindowFor(window), event); | 425 FindFocusableWindowFor(window), event); |
422 } | 426 } |
423 } | 427 } |
424 | 428 |
425 } // namespace internal | 429 } // namespace internal |
426 } // namespace ash | 430 } // namespace ash |
OLD | NEW |