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 "ui/views/focus/accelerator_handler.h" | 5 #include "ui/views/focus/accelerator_handler.h" |
6 | 6 |
7 #include "ui/base/event.h" | 7 #include "ui/base/event.h" |
8 #include "ui/base/keycodes/keyboard_code_conversion_win.h" | 8 #include "ui/base/keycodes/keyboard_code_conversion_win.h" |
9 #include "ui/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
10 #include "ui/views/events/event.h" | |
11 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
12 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
13 | 12 |
14 namespace views { | 13 namespace views { |
15 | 14 |
16 AcceleratorHandler::AcceleratorHandler() { | 15 AcceleratorHandler::AcceleratorHandler() { |
17 } | 16 } |
18 | 17 |
19 bool AcceleratorHandler::Dispatch(const base::NativeEvent& msg) { | 18 bool AcceleratorHandler::Dispatch(const base::NativeEvent& msg) { |
20 if (msg.message >= WM_KEYFIRST && msg.message <= WM_KEYLAST) { | 19 if (msg.message >= WM_KEYFIRST && msg.message <= WM_KEYLAST) { |
(...skipping 26 matching lines...) Expand all Loading... |
47 } | 46 } |
48 } | 47 } |
49 } | 48 } |
50 | 49 |
51 TranslateMessage(&msg); | 50 TranslateMessage(&msg); |
52 DispatchMessage(&msg); | 51 DispatchMessage(&msg); |
53 return true; | 52 return true; |
54 } | 53 } |
55 | 54 |
56 } // namespace views | 55 } // namespace views |
OLD | NEW |