| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 if (gained_focus) | 268 if (gained_focus) |
| 269 ActivateWindow(GetActivatableWindow(gained_focus, NULL)); | 269 ActivateWindow(GetActivatableWindow(gained_focus, NULL)); |
| 270 } | 270 } |
| 271 | 271 |
| 272 //////////////////////////////////////////////////////////////////////////////// | 272 //////////////////////////////////////////////////////////////////////////////// |
| 273 // ActivationController, ui::EventHandler implementation: | 273 // ActivationController, ui::EventHandler implementation: |
| 274 | 274 |
| 275 void ActivationController::OnKeyEvent(ui::KeyEvent* event) { | 275 void ActivationController::OnKeyEvent(ui::KeyEvent* event) { |
| 276 } | 276 } |
| 277 | 277 |
| 278 ui::EventResult ActivationController::OnMouseEvent(ui::MouseEvent* event) { | 278 void ActivationController::OnMouseEvent(ui::MouseEvent* event) { |
| 279 if (event->type() == ui::ET_MOUSE_PRESSED) | 279 if (event->type() == ui::ET_MOUSE_PRESSED) |
| 280 FocusWindowWithEvent(event); | 280 FocusWindowWithEvent(event); |
| 281 return ui::ER_UNHANDLED; | |
| 282 } | 281 } |
| 283 | 282 |
| 284 void ActivationController::OnScrollEvent(ui::ScrollEvent* event) { | 283 void ActivationController::OnScrollEvent(ui::ScrollEvent* event) { |
| 285 } | 284 } |
| 286 | 285 |
| 287 void ActivationController::OnTouchEvent(ui::TouchEvent* event) { | 286 void ActivationController::OnTouchEvent(ui::TouchEvent* event) { |
| 288 if (event->type() == ui::ET_TOUCH_PRESSED) | 287 if (event->type() == ui::ET_TOUCH_PRESSED) |
| 289 FocusWindowWithEvent(event); | 288 FocusWindowWithEvent(event); |
| 290 } | 289 } |
| 291 | 290 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 aura::Window* window = static_cast<aura::Window*>(event->target()); | 422 aura::Window* window = static_cast<aura::Window*>(event->target()); |
| 424 window = delegate_->WillFocusWindow(window); | 423 window = delegate_->WillFocusWindow(window); |
| 425 if (GetActiveWindow() != window) { | 424 if (GetActiveWindow() != window) { |
| 426 aura::client::GetFocusClient(window)->FocusWindow( | 425 aura::client::GetFocusClient(window)->FocusWindow( |
| 427 FindFocusableWindowFor(window), event); | 426 FindFocusableWindowFor(window), event); |
| 428 } | 427 } |
| 429 } | 428 } |
| 430 | 429 |
| 431 } // namespace internal | 430 } // namespace internal |
| 432 } // namespace ash | 431 } // namespace ash |
| OLD | NEW |