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

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

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/window_modality_controller.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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void FocusController::OnKeyEvent(ui::KeyEvent* event) { 152 void FocusController::OnKeyEvent(ui::KeyEvent* event) {
153 } 153 }
154 154
155 ui::EventResult FocusController::OnMouseEvent(ui::MouseEvent* event) { 155 void FocusController::OnMouseEvent(ui::MouseEvent* event) {
156 if (event->type() == ui::ET_MOUSE_PRESSED) 156 if (event->type() == ui::ET_MOUSE_PRESSED)
157 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target())); 157 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target()));
158 return ui::ER_UNHANDLED;
159 } 158 }
160 159
161 void FocusController::OnScrollEvent(ui::ScrollEvent* event) { 160 void FocusController::OnScrollEvent(ui::ScrollEvent* event) {
162 } 161 }
163 162
164 void FocusController::OnTouchEvent(ui::TouchEvent* event) { 163 void FocusController::OnTouchEvent(ui::TouchEvent* event) {
165 } 164 }
166 165
167 void FocusController::OnGestureEvent(ui::GestureEvent* event) { 166 void FocusController::OnGestureEvent(ui::GestureEvent* event) {
168 if (event->type() == ui::ET_GESTURE_BEGIN && 167 if (event->type() == ui::ET_GESTURE_BEGIN &&
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); 276 SetFocusedWindow(rules_->GetNextFocusableWindow(window));
278 } 277 }
279 } 278 }
280 279
281 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { 280 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) {
282 FocusWindow(window, NULL); 281 FocusWindow(window, NULL);
283 } 282 }
284 283
285 } // namespace corewm 284 } // namespace corewm
286 } // namespace views 285 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/focus_controller.h ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698