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

Side by Side Diff: webkit/glue/webinputevent.h

Issue 40065: RenderWidgetHost now stores both the WebKeyboardEvent and the native (Closed)
Patch Set: Redesign Created 11 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_WEBINPUTEVENT_H_ 5 #ifndef WEBKIT_GLUE_WEBINPUTEVENT_H_
6 #define WEBKIT_GLUE_WEBINPUTEVENT_H_ 6 #define WEBKIT_GLUE_WEBINPUTEVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 char16 unmodified_text[kTextLengthCap]; 174 char16 unmodified_text[kTextLengthCap];
175 175
176 // This is a string identifying the key pressed. 176 // This is a string identifying the key pressed.
177 char key_identifier[kIdentifierLengthCap]; 177 char key_identifier[kIdentifierLengthCap];
178 178
179 // This identifies whether this event was tagged by the system as being a 179 // This identifies whether this event was tagged by the system as being a
180 // "system key" event (see 180 // "system key" event (see
181 // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). 181 // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
182 // Other platforms don't have this concept, but it's just easier to leave it 182 // Other platforms don't have this concept, but it's just easier to leave it
183 // always false than ifdef. 183 // always false than ifdef.
184
185 bool system_key; 184 bool system_key;
186 185
187 // References to the original event.
188 #if defined(OS_WIN)
189 MSG actual_message; // Set to the current keyboard message. TODO(avi): remove
190 #endif
191
192 WebKeyboardEvent() : windows_key_code(0), 186 WebKeyboardEvent() : windows_key_code(0),
193 native_key_code(0), 187 native_key_code(0),
194 system_key(false) { 188 system_key(false) {
195 memset(&text, 0, sizeof(text)); 189 memset(&text, 0, sizeof(text));
196 memset(&unmodified_text, 0, sizeof(unmodified_text)); 190 memset(&unmodified_text, 0, sizeof(unmodified_text));
197 memset(&key_identifier, 0, sizeof(key_identifier)); 191 memset(&key_identifier, 0, sizeof(key_identifier));
198 #if defined(OS_WIN)
199 memset(&actual_message, 0, sizeof(actual_message));
200 #endif
201 } 192 }
202 193
203 #if defined(OS_WIN) 194 #if defined(OS_WIN)
204 explicit WebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, 195 WebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
205 LPARAM lparam);
206 #elif defined(OS_MACOSX) 196 #elif defined(OS_MACOSX)
207 explicit WebKeyboardEvent(NSEvent *event); 197 explicit WebKeyboardEvent(NSEvent *event);
208 #elif defined(OS_LINUX) 198 #elif defined(OS_LINUX)
209 explicit WebKeyboardEvent(const GdkEventKey* event); 199 explicit WebKeyboardEvent(const GdkEventKey* event);
210 #endif 200 #endif
211 }; 201 };
212 202
213 #endif // WEBKIT_GLUE_WEBINPUTEVENT_H_ 203 #endif // WEBKIT_GLUE_WEBINPUTEVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698