OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 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/common/native_web_keyboard_event.h" | |
6 | |
7 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact
ory.h" | |
8 | |
9 using WebKit::WebInputEventFactory; | |
10 using WebKit::WebKeyboardEvent; | |
11 | |
12 NativeWebKeyboardEvent::NativeWebKeyboardEvent() | |
13 : skip_in_browser(false) { | |
14 memset(&os_event, 0, sizeof(os_event)); | |
15 } | |
16 | |
17 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | |
18 HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) | |
19 : WebKeyboardEvent( | |
20 WebInputEventFactory::keyboardEvent(hwnd, message, wparam, lparam)), | |
21 skip_in_browser(false) { | |
22 os_event.hwnd = hwnd; | |
23 os_event.message = message; | |
24 os_event.wParam = wparam; | |
25 os_event.lParam = lparam; | |
26 } | |
27 | |
28 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | |
29 const NativeWebKeyboardEvent& other) | |
30 : WebKeyboardEvent(other), | |
31 skip_in_browser(other.skip_in_browser) { | |
32 os_event.hwnd = other.os_event.hwnd; | |
33 os_event.message = other.os_event.message; | |
34 os_event.wParam = other.os_event.wParam; | |
35 os_event.lParam = other.os_event.lParam; | |
36 } | |
37 | |
38 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | |
39 const NativeWebKeyboardEvent& other) { | |
40 WebKeyboardEvent::operator=(other); | |
41 | |
42 os_event.hwnd = other.os_event.hwnd; | |
43 os_event.message = other.os_event.message; | |
44 os_event.wParam = other.os_event.wParam; | |
45 os_event.lParam = other.os_event.lParam; | |
46 | |
47 skip_in_browser = other.skip_in_browser; | |
48 | |
49 return *this; | |
50 } | |
51 | |
52 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | |
53 // Noop under windows | |
54 } | |
OLD | NEW |