Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: ui/views/corewm/focus_controller.cc

Issue 11570012: events: Update key-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-for-landing Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/corewm/focus_controller.h ('k') | ui/views/corewm/input_method_event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/corewm/focus_controller.h ('k') | ui/views/corewm/input_method_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698