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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 ui::EventResult ActivationController::OnKeyEvent(ui::KeyEvent* event) { | 275 ui::EventResult ActivationController::OnKeyEvent(ui::KeyEvent* event) { |
276 return ui::ER_UNHANDLED; | 276 return ui::ER_UNHANDLED; |
277 } | 277 } |
278 | 278 |
279 ui::EventResult ActivationController::OnMouseEvent(ui::MouseEvent* event) { | 279 ui::EventResult ActivationController::OnMouseEvent(ui::MouseEvent* event) { |
280 if (event->type() == ui::ET_MOUSE_PRESSED) | 280 if (event->type() == ui::ET_MOUSE_PRESSED) |
281 FocusWindowWithEvent(event); | 281 FocusWindowWithEvent(event); |
282 return ui::ER_UNHANDLED; | 282 return ui::ER_UNHANDLED; |
283 } | 283 } |
284 | 284 |
285 ui::EventResult ActivationController::OnScrollEvent(ui::ScrollEvent* event) { | 285 void ActivationController::OnScrollEvent(ui::ScrollEvent* event) { |
286 return ui::ER_UNHANDLED; | |
287 } | 286 } |
288 | 287 |
289 ui::EventResult ActivationController::OnTouchEvent(ui::TouchEvent* event) { | 288 void ActivationController::OnTouchEvent(ui::TouchEvent* event) { |
290 if (event->type() == ui::ET_TOUCH_PRESSED) | 289 if (event->type() == ui::ET_TOUCH_PRESSED) |
291 FocusWindowWithEvent(event); | 290 FocusWindowWithEvent(event); |
292 return ui::ER_UNHANDLED; | |
293 } | 291 } |
294 | 292 |
295 void ActivationController::OnGestureEvent(ui::GestureEvent* event) { | 293 void ActivationController::OnGestureEvent(ui::GestureEvent* event) { |
296 if (event->type() == ui::ET_GESTURE_BEGIN && | 294 if (event->type() == ui::ET_GESTURE_BEGIN && |
297 event->details().touch_points() == 1) { | 295 event->details().touch_points() == 1) { |
298 FocusWindowWithEvent(event); | 296 FocusWindowWithEvent(event); |
299 } | 297 } |
300 } | 298 } |
301 | 299 |
302 //////////////////////////////////////////////////////////////////////////////// | 300 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 aura::Window* window = static_cast<aura::Window*>(event->target()); | 424 aura::Window* window = static_cast<aura::Window*>(event->target()); |
427 window = delegate_->WillFocusWindow(window); | 425 window = delegate_->WillFocusWindow(window); |
428 if (GetActiveWindow() != window) { | 426 if (GetActiveWindow() != window) { |
429 aura::client::GetFocusClient(window)->FocusWindow( | 427 aura::client::GetFocusClient(window)->FocusWindow( |
430 FindFocusableWindowFor(window), event); | 428 FindFocusableWindowFor(window), event); |
431 } | 429 } |
432 } | 430 } |
433 | 431 |
434 } // namespace internal | 432 } // namespace internal |
435 } // namespace ash | 433 } // namespace ash |
OLD | NEW |