Chromium Code Reviews| 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 NativeWebKeyboardEvent::NativeWebKeyboardEvent() { | |
| 8 actual_message.hwnd = NULL; | |
|
darin (slow to review)
2009/03/06 04:45:35
memset(&actual_message, 0, sizeof(actual_message))
Elliot Glaysher
2009/03/06 20:51:25
I can't make this private because I use the defaul
| |
| 9 actual_message.message = 0; | |
| 10 actual_message.wParam = 0; | |
| 11 actual_message.lParam = 0; | |
| 12 } | |
| 13 | |
| 14 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | |
| 15 HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) | |
| 16 : WebKeyboardEvent(hwnd, message, wparam, lparam) { | |
| 17 actual_message.hwnd = hwnd; | |
| 18 actual_message.message = message; | |
| 19 actual_message.wParam = wparam; | |
| 20 actual_message.lParam = lparam; | |
| 21 } | |
| 22 | |
| 23 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | |
|
darin (slow to review)
2009/03/06 04:45:35
i don't think there is any reason to implement cop
Elliot Glaysher
2009/03/06 20:51:25
I feel this is the lesser of two evils compared to
| |
| 24 const NativeWebKeyboardEvent& other) | |
| 25 : WebKeyboardEvent(other) { | |
| 26 actual_message.hwnd = other.actual_message.hwnd; | |
| 27 actual_message.message = other.actual_message.message; | |
| 28 actual_message.wParam = other.actual_message.wParam; | |
| 29 actual_message.lParam = other.actual_message.lParam; | |
| 30 } | |
| 31 | |
| 32 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | |
| 33 const NativeWebKeyboardEvent& other) { | |
| 34 WebKeyboardEvent::operator=(other); | |
| 35 | |
| 36 actual_message.hwnd = other.actual_message.hwnd; | |
| 37 actual_message.message = other.actual_message.message; | |
| 38 actual_message.wParam = other.actual_message.wParam; | |
| 39 actual_message.lParam = other.actual_message.lParam; | |
| 40 return *this; | |
| 41 } | |
| 42 | |
| 43 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | |
| 44 // Noop under windows | |
| 45 } | |
| OLD | NEW |