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.
5 #include "content/public/browser/native_web_keyboard_event.h"
7 #include "third_party/WebKit/public/web/win/WebInputEventFactory.h"
9 using WebKit::WebInputEventFactory
;
10 using WebKit::WebKeyboardEvent
;
14 NativeWebKeyboardEvent::NativeWebKeyboardEvent()
15 : skip_in_browser(false) {
16 memset(&os_event
, 0, sizeof(os_event
));
19 NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event
)
21 WebInputEventFactory::keyboardEvent(native_event
.hwnd
,
24 native_event
.lParam
)),
25 os_event(native_event
),
26 skip_in_browser(false) {
29 NativeWebKeyboardEvent::NativeWebKeyboardEvent(
30 const NativeWebKeyboardEvent
& other
)
31 : WebKeyboardEvent(other
),
32 os_event(other
.os_event
),
33 skip_in_browser(other
.skip_in_browser
) {
36 NativeWebKeyboardEvent
& NativeWebKeyboardEvent::operator=(
37 const NativeWebKeyboardEvent
& other
) {
38 WebKeyboardEvent::operator=(other
);
40 os_event
= other
.os_event
;
41 skip_in_browser
= other
.skip_in_browser
;
46 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
50 } // namespace content