Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2386)

Unified Diff: chrome/common/native_web_keyboard_event_win.cc

Issue 40065: RenderWidgetHost now stores both the WebKeyboardEvent and the native (Closed)
Patch Set: Redesign Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/native_web_keyboard_event_win.cc
diff --git a/chrome/common/native_web_keyboard_event_win.cc b/chrome/common/native_web_keyboard_event_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5be31fa55a70af2269a2a09a3977fe4055bebd52
--- /dev/null
+++ b/chrome/common/native_web_keyboard_event_win.cc
@@ -0,0 +1,45 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/native_web_keyboard_event.h"
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent() {
+ 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
+ actual_message.message = 0;
+ actual_message.wParam = 0;
+ actual_message.lParam = 0;
+}
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(
+ HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
+ : WebKeyboardEvent(hwnd, message, wparam, lparam) {
+ actual_message.hwnd = hwnd;
+ actual_message.message = message;
+ actual_message.wParam = wparam;
+ actual_message.lParam = lparam;
+}
+
+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
+ const NativeWebKeyboardEvent& other)
+ : WebKeyboardEvent(other) {
+ actual_message.hwnd = other.actual_message.hwnd;
+ actual_message.message = other.actual_message.message;
+ actual_message.wParam = other.actual_message.wParam;
+ actual_message.lParam = other.actual_message.lParam;
+}
+
+NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
+ const NativeWebKeyboardEvent& other) {
+ WebKeyboardEvent::operator=(other);
+
+ actual_message.hwnd = other.actual_message.hwnd;
+ actual_message.message = other.actual_message.message;
+ actual_message.wParam = other.actual_message.wParam;
+ actual_message.lParam = other.actual_message.lParam;
+ return *this;
+}
+
+NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
+ // Noop under windows
+}

Powered by Google App Engine
This is Rietveld 408576698