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

Side by Side Diff: chrome/browser/ui/views/unhandled_keyboard_event_handler_aurax11.cc

Issue 8907029: AURA/X11: Handle VKEY_MENU accelerator on content area (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 11 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
6
7 #include "base/logging.h"
8 #include "content/public/browser/native_web_keyboard_event.h"
9 #include "ui/aura/event.h"
10 #include "ui/views/focus/focus_manager.h"
11
12 UnhandledKeyboardEventHandler::UnhandledKeyboardEventHandler() {
13 }
14
15 void UnhandledKeyboardEventHandler::HandleKeyboardEvent(
16 const NativeWebKeyboardEvent& event,
17 views::FocusManager* focus_manager) {
18 if (!focus_manager) {
19 NOTREACHED();
20 return;
21 }
22 // A false char event may be sent to the renderer if the key
23 // event changed the focus. See crbug.com/108480.
24 if (event.os_event && !event.skip_in_browser &&
25 !static_cast<aura::KeyEvent*>(event.os_event)->is_char()) {
26 views::KeyEvent views_event(event.os_event);
27 focus_manager->OnKeyEvent(views_event);
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698