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

Side by Side Diff: ash/wm/activation_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 | « ash/wm/activation_controller.h ('k') | ash/wm/event_rewriter_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 "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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 void ActivationController::OnWindowFocused(aura::Window* gained_focus, 266 void ActivationController::OnWindowFocused(aura::Window* gained_focus,
267 aura::Window* lost_focus) { 267 aura::Window* lost_focus) {
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 ui::EventResult ActivationController::OnKeyEvent(ui::KeyEvent* event) { 275 void ActivationController::OnKeyEvent(ui::KeyEvent* event) {
276 return ui::ER_UNHANDLED;
277 } 276 }
278 277
279 ui::EventResult ActivationController::OnMouseEvent(ui::MouseEvent* event) { 278 ui::EventResult ActivationController::OnMouseEvent(ui::MouseEvent* event) {
280 if (event->type() == ui::ET_MOUSE_PRESSED) 279 if (event->type() == ui::ET_MOUSE_PRESSED)
281 FocusWindowWithEvent(event); 280 FocusWindowWithEvent(event);
282 return ui::ER_UNHANDLED; 281 return ui::ER_UNHANDLED;
283 } 282 }
284 283
285 void ActivationController::OnScrollEvent(ui::ScrollEvent* event) { 284 void ActivationController::OnScrollEvent(ui::ScrollEvent* event) {
286 } 285 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 aura::Window* window = static_cast<aura::Window*>(event->target()); 423 aura::Window* window = static_cast<aura::Window*>(event->target());
425 window = delegate_->WillFocusWindow(window); 424 window = delegate_->WillFocusWindow(window);
426 if (GetActiveWindow() != window) { 425 if (GetActiveWindow() != window) {
427 aura::client::GetFocusClient(window)->FocusWindow( 426 aura::client::GetFocusClient(window)->FocusWindow(
428 FindFocusableWindowFor(window), event); 427 FindFocusableWindowFor(window), event);
429 } 428 }
430 } 429 }
431 430
432 } // namespace internal 431 } // namespace internal
433 } // namespace ash 432 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/activation_controller.h ('k') | ash/wm/event_rewriter_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698