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

Side by Side Diff: content/browser/renderer_host/web_input_event_aurax11.cc

Issue 8370024: aura: Add mouse wheel event support for x11 in RWHVA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 // Portions based heavily on: 5 // Portions based heavily on:
6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp 6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp
7 // 7 //
8 /* 8 /*
9 * Copyright (C) 2006-2011 Google Inc. All rights reserved. 9 * Copyright (C) 2006-2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 NOTIMPLEMENTED() << "Received unexpected event: " << event->type(); 247 NOTIMPLEMENTED() << "Received unexpected event: " << event->type();
248 break; 248 break;
249 } 249 }
250 250
251 return webkit_event; 251 return webkit_event;
252 } 252 }
253 253
254 WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( 254 WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
255 aura::MouseEvent* event) { 255 aura::MouseEvent* event) {
256 WebKit::WebMouseWheelEvent webkit_event; 256 WebKit::WebMouseWheelEvent webkit_event;
257 // TODO(sadrul): ! 257
258 webkit_event.type = WebKit::WebInputEvent::MouseWheel;
259 webkit_event.button = WebKit::WebMouseEvent::ButtonNone;
260 webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags());
261 webkit_event.timeStampSeconds = event->time_stamp().ToDoubleT();
262 webkit_event.deltaY = ui::GetMouseWheelOffset(event->native_event());
263 webkit_event.wheelTicksY = webkit_event.deltaY > 0 ? 1 : -1;
264
258 return webkit_event; 265 return webkit_event;
259 } 266 }
260 267
261 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( 268 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent(
262 aura::KeyEvent* event) { 269 aura::KeyEvent* event) {
263 base::NativeEvent native_event = event->native_event(); 270 base::NativeEvent native_event = event->native_event();
264 WebKit::WebKeyboardEvent webkit_event; 271 WebKit::WebKeyboardEvent webkit_event;
265 XKeyEvent* native_key_event = &native_event->xkey; 272 XKeyEvent* native_key_event = &native_event->xkey;
266 273
267 webkit_event.timeStampSeconds = 274 webkit_event.timeStampSeconds =
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 313 }
307 314
308 webkit_event.setKeyIdentifierFromWindowsKeyCode(); 315 webkit_event.setKeyIdentifierFromWindowsKeyCode();
309 316
310 // TODO: IsAutoRepeat/IsKeyPad? 317 // TODO: IsAutoRepeat/IsKeyPad?
311 318
312 return webkit_event; 319 return webkit_event;
313 } 320 }
314 321
315 } // namespace content 322 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698