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

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

Issue 10824158: Pass tap count (1 or 2) with tap gesture events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk Created 8 years, 4 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 | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <peninputpanel_i.c> 9 #include <peninputpanel_i.c>
10 #include <stack> 10 #include <stack>
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Map to the appropriate window's coordinates. For a root window the 408 // Map to the appropriate window's coordinates. For a root window the
409 // coordinates won't change, because the parent shares our rect. 409 // coordinates won't change, because the parent shares our rect.
410 POINT client_point = { location.x(), location.y()}; 410 POINT client_point = { location.x(), location.y()};
411 MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1); 411 MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1);
412 POINT screen_point = { location.x(), location.y()}; 412 POINT screen_point = { location.x(), location.y()};
413 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); 413 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1);
414 data().x = client_point.x; 414 data().x = client_point.x;
415 data().y = client_point.y; 415 data().y = client_point.y;
416 data().globalX = screen_point.x; 416 data().globalX = screen_point.x;
417 data().globalY = screen_point.y; 417 data().globalY = screen_point.y;
418 data().deltaX = details.generic_x();
419 data().deltaY = details.generic_y();
420 data().type = ConvertToWebInputEvent(type_); 418 data().type = ConvertToWebInputEvent(type_);
421 data().boundingBox = details.bounding_box(); 419 data().boundingBox = details.bounding_box();
420
421 // Copy any event-type specific data.
422 switch (type_) {
423 case ui::ET_GESTURE_TAP:
424 data().deltaX = details.tap_count();
425 break;
426 case ui::ET_GESTURE_SCROLL_UPDATE:
427 data().deltaX = details.scroll_x();
428 data().deltaY = details.scroll_y();
429 break;
430 case ui::ET_GESTURE_PINCH_UPDATE:
431 data().deltaX = details.scale();
432 break;
433 case ui::ET_SCROLL_FLING_START:
434 data().deltaX = details.velocity_x();
435 data().deltaY = details.velocity_y();
436 default:
437 break;
438 }
422 } 439 }
423 440
424 virtual int GetLowestTouchId() const OVERRIDE { 441 virtual int GetLowestTouchId() const OVERRIDE {
425 return LowestBit(touch_ids_bitfield_); 442 return LowestBit(touch_ids_bitfield_);
426 } 443 }
427 444
428 ui::EventType type() { 445 ui::EventType type() {
429 return type_; 446 return type_;
430 } 447 }
431 448
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3148 // receive a focus change in the context of a pointer down message, it means 3165 // receive a focus change in the context of a pointer down message, it means
3149 // that the pointer down message occurred on the edit field and we should 3166 // that the pointer down message occurred on the edit field and we should
3150 // display the on screen keyboard 3167 // display the on screen keyboard
3151 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 3168 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
3152 DisplayOnScreenKeyboardIfNeeded(); 3169 DisplayOnScreenKeyboardIfNeeded();
3153 received_focus_change_after_pointer_down_ = false; 3170 received_focus_change_after_pointer_down_ = false;
3154 pointer_down_context_ = false; 3171 pointer_down_context_ = false;
3155 } 3172 }
3156 3173
3157 } // namespace content 3174 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698