| 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/client/activation_change_observer.h" | 8 #include "ui/aura/client/activation_change_observer.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/focus_change_observer.h" | 10 #include "ui/aura/client/focus_change_observer.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 aura::Window* window, | 142 aura::Window* window, |
| 143 aura::RootWindow* root_window, | 143 aura::RootWindow* root_window, |
| 144 bool destroyed) { | 144 bool destroyed) { |
| 145 //NOTREACHED(); | 145 //NOTREACHED(); |
| 146 // This method is only for compat with aura::FocusManager. It should not be | 146 // This method is only for compat with aura::FocusManager. It should not be |
| 147 // needed in the new FocusController. | 147 // needed in the new FocusController. |
| 148 } | 148 } |
| 149 | 149 |
| 150 //////////////////////////////////////////////////////////////////////////////// | 150 //////////////////////////////////////////////////////////////////////////////// |
| 151 // FocusController, ui::EventHandler implementation: | 151 // FocusController, ui::EventHandler implementation: |
| 152 ui::EventResult FocusController::OnKeyEvent(ui::KeyEvent* event) { | 152 void FocusController::OnKeyEvent(ui::KeyEvent* event) { |
| 153 return ui::ER_UNHANDLED; | |
| 154 } | 153 } |
| 155 | 154 |
| 156 ui::EventResult FocusController::OnMouseEvent(ui::MouseEvent* event) { | 155 ui::EventResult FocusController::OnMouseEvent(ui::MouseEvent* event) { |
| 157 if (event->type() == ui::ET_MOUSE_PRESSED) | 156 if (event->type() == ui::ET_MOUSE_PRESSED) |
| 158 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target())); | 157 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target())); |
| 159 return ui::ER_UNHANDLED; | 158 return ui::ER_UNHANDLED; |
| 160 } | 159 } |
| 161 | 160 |
| 162 void FocusController::OnScrollEvent(ui::ScrollEvent* event) { | 161 void FocusController::OnScrollEvent(ui::ScrollEvent* event) { |
| 163 } | 162 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); | 277 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); |
| 279 } | 278 } |
| 280 } | 279 } |
| 281 | 280 |
| 282 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { | 281 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { |
| 283 FocusWindow(window, NULL); | 282 FocusWindow(window, NULL); |
| 284 } | 283 } |
| 285 | 284 |
| 286 } // namespace corewm | 285 } // namespace corewm |
| 287 } // namespace views | 286 } // namespace views |
| OLD | NEW |