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

Unified Diff: chrome/common/native_web_keyboard_event.h

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.h
diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..4de91dd8f5cd240139680441d8d85df43c389d66
--- /dev/null
+++ b/chrome/common/native_web_keyboard_event.h
@@ -0,0 +1,53 @@
+// 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.
+
+#ifndef BASE_GFX_NATIVE_EVENT_H_
+#define BASE_GFX_NATIVE_EVENT_H_
darin (slow to review) 2009/03/06 04:45:35 nit: include guard is out-of-date
Elliot Glaysher 2009/03/06 20:51:25 Done.
+
+#include "build/build_config.h"
darin (slow to review) 2009/03/06 04:45:35 nit: no need to include this since you are includi
Elliot Glaysher 2009/03/06 20:51:25 Done.
+
+#include "base/basictypes.h"
+#include "webkit/glue/webinputevent.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
+#elif defined(OS_MACOSX)
+#ifdef __OBJC__
+@class NSEvent;
+#else
+class NSEvent;
+#endif // __OBJC__
+#elif defined(OS_LINUX)
+#include <gdk/gdk.h>
+#endif
+
+// Owns a platform specific event; used to pass own and pass event through
+// platform independent code.
+struct NativeWebKeyboardEvent : public WebKeyboardEvent {
+ public:
darin (slow to review) 2009/03/06 04:45:35 nit: no need for public here since it is a struct
Elliot Glaysher 2009/03/06 20:51:25 Done.
+ NativeWebKeyboardEvent();
+
+#if defined(OS_WIN)
+ NativeWebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
+#elif defined(OS_MACOSX)
+ explicit NativeWebKeyboardEvent(NSEvent *event);
+#elif defined(OS_LINUX)
+ explicit NativeWebKeyboardEvent(const GdkEventKey* event);
+#endif
+
+ NativeWebKeyboardEvent(const NativeWebKeyboardEvent& event);
+ ~NativeWebKeyboardEvent();
+
+ NativeWebKeyboardEvent& operator=(const NativeWebKeyboardEvent& event);
+
+#if defined(OS_WIN)
darin (slow to review) 2009/03/06 04:45:35 nit: maybe all of these member variables could hav
Elliot Glaysher 2009/03/06 20:51:25 Done.
+ MSG actual_message;
+#elif defined(OS_MACOSX)
+ NSEvent* event;
+#elif defined(OS_LINUX)
+ GdkEventKey* event;
+#endif
+};
+
+#endif // BASE_GFX_NATIVE_EVENT_H_

Powered by Google App Engine
This is Rietveld 408576698