OLD | NEW |
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 "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 5 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/public/browser/native_web_keyboard_event.h" | 8 #include "content/public/browser/native_web_keyboard_event.h" |
9 #include "ui/views/focus/focus_manager.h" | 9 #include "ui/views/focus/focus_manager.h" |
10 | 10 |
| 11 using content::NativeWebKeyboardEvent; |
| 12 |
11 UnhandledKeyboardEventHandler::UnhandledKeyboardEventHandler() { | 13 UnhandledKeyboardEventHandler::UnhandledKeyboardEventHandler() { |
12 ignore_next_char_event_ = false; | 14 ignore_next_char_event_ = false; |
13 } | 15 } |
14 | 16 |
15 void UnhandledKeyboardEventHandler::HandleKeyboardEvent( | 17 void UnhandledKeyboardEventHandler::HandleKeyboardEvent( |
16 const NativeWebKeyboardEvent& event, | 18 const NativeWebKeyboardEvent& event, |
17 views::FocusManager* focus_manager) { | 19 views::FocusManager* focus_manager) { |
18 if (!focus_manager) { | 20 if (!focus_manager) { |
19 NOTREACHED(); | 21 NOTREACHED(); |
20 return; | 22 return; |
(...skipping 29 matching lines...) Expand all Loading... |
50 ignore_next_char_event_ = false; | 52 ignore_next_char_event_ = false; |
51 } | 53 } |
52 | 54 |
53 #if defined(OS_WIN) && !defined(USE_AURA) | 55 #if defined(OS_WIN) && !defined(USE_AURA) |
54 // Any unhandled keyboard/character messages should be defproced. | 56 // Any unhandled keyboard/character messages should be defproced. |
55 // This allows stuff like F10, etc to work correctly. | 57 // This allows stuff like F10, etc to work correctly. |
56 DefWindowProc(event.os_event.hwnd, event.os_event.message, | 58 DefWindowProc(event.os_event.hwnd, event.os_event.message, |
57 event.os_event.wParam, event.os_event.lParam); | 59 event.os_event.wParam, event.os_event.lParam); |
58 #endif | 60 #endif |
59 } | 61 } |
OLD | NEW |