OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/dropdown_bar_host.h" | 5 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include "chrome/browser/tab_contents/tab_contents.h" | 9 #include "chrome/browser/tab_contents/tab_contents.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // TODO(oshima): This is a copy from | 35 // TODO(oshima): This is a copy from |
36 // RenderWidgetHostViewViews::OnKeyPressed(). | 36 // RenderWidgetHostViewViews::OnKeyPressed(). |
37 // Refactor and eliminate the dup code. | 37 // Refactor and eliminate the dup code. |
38 NativeWebKeyboardEvent wke; | 38 NativeWebKeyboardEvent wke; |
39 wke.type = WebKit::WebInputEvent::KeyDown; | 39 wke.type = WebKit::WebInputEvent::KeyDown; |
40 wke.windowsKeyCode = key_event.GetKeyCode(); | 40 wke.windowsKeyCode = key_event.GetKeyCode(); |
41 wke.setKeyIdentifierFromWindowsKeyCode(); | 41 wke.setKeyIdentifierFromWindowsKeyCode(); |
42 | 42 |
43 wke.text[0] = wke.unmodifiedText[0] = | 43 wke.text[0] = wke.unmodifiedText[0] = |
44 static_cast<unsigned short>(gdk_keyval_to_unicode( | 44 static_cast<unsigned short>(gdk_keyval_to_unicode( |
45 app::GdkKeyCodeForWindowsKeyCode(key_event.GetKeyCode(), | 45 ui::GdkKeyCodeForWindowsKeyCode(key_event.GetKeyCode(), |
46 key_event.IsShiftDown() ^ key_event.IsCapsLockDown()))); | 46 key_event.IsShiftDown() ^ key_event.IsCapsLockDown()))); |
47 return wke; | 47 return wke; |
48 #else | 48 #else |
49 return NativeWebKeyboardEvent(key_event.native_event()); | 49 return NativeWebKeyboardEvent(key_event.native_event()); |
50 #endif | 50 #endif |
51 } | 51 } |
OLD | NEW |