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

Side by Side Diff: ui/aura/root_window.cc

Issue 9835032: aura: Make RootWindow::DispatchKeyEvent drop unknown keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months 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/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } else { 187 } else {
188 DispatchHeldMouseMove(); 188 DispatchHeldMouseMove();
189 } 189 }
190 } 190 }
191 return DispatchMouseEventImpl(event); 191 return DispatchMouseEventImpl(event);
192 } 192 }
193 193
194 bool RootWindow::DispatchKeyEvent(KeyEvent* event) { 194 bool RootWindow::DispatchKeyEvent(KeyEvent* event) {
195 DispatchHeldMouseMove(); 195 DispatchHeldMouseMove();
196 KeyEvent translated_event(*event); 196 KeyEvent translated_event(*event);
197 if (translated_event.key_code() == ui::VKEY_UNKNOWN)
198 return false;
197 return ProcessKeyEvent(focused_window_, &translated_event); 199 return ProcessKeyEvent(focused_window_, &translated_event);
198 } 200 }
199 201
200 bool RootWindow::DispatchScrollEvent(ScrollEvent* event) { 202 bool RootWindow::DispatchScrollEvent(ScrollEvent* event) {
201 DispatchHeldMouseMove(); 203 DispatchHeldMouseMove();
202 event->UpdateForRootTransform(layer()->transform()); 204 event->UpdateForRootTransform(layer()->transform());
203 205
204 last_mouse_location_ = event->location(); 206 last_mouse_location_ = event->location();
205 synthesize_mouse_move_ = false; 207 synthesize_mouse_move_ = false;
206 208
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 // is currently broken. See/ crbug.com/107931. 816 // is currently broken. See/ crbug.com/107931.
815 MouseEvent event(ui::ET_MOUSE_MOVED, 817 MouseEvent event(ui::ET_MOUSE_MOVED,
816 orig_mouse_location, 818 orig_mouse_location,
817 orig_mouse_location, 819 orig_mouse_location,
818 ui::EF_IS_SYNTHESIZED); 820 ui::EF_IS_SYNTHESIZED);
819 DispatchMouseEvent(&event); 821 DispatchMouseEvent(&event);
820 #endif 822 #endif
821 } 823 }
822 824
823 } // namespace aura 825 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698