| OLD | NEW |
| (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/views/focus/focus_manager.h" |
| 10 |
| 11 UnhandledKeyboardEventHandler::UnhandledKeyboardEventHandler() { |
| 12 } |
| 13 |
| 14 void UnhandledKeyboardEventHandler::HandleKeyboardEvent( |
| 15 const NativeWebKeyboardEvent& event, |
| 16 views::FocusManager* focus_manager) { |
| 17 if (!focus_manager) { |
| 18 NOTREACHED(); |
| 19 return; |
| 20 } |
| 21 if (event.os_event && !event.skip_in_browser) { |
| 22 const views::KeyEvent views_event(event.os_event); |
| 23 focus_manager->OnKeyEvent(views_event); |
| 24 } |
| 25 } |
| OLD | NEW |