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

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

Issue 133053004: Ensure that trackpad and trackpoint scrolling works on Windows desktop Aura with legacy trackpad dr… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | ui/events/win/events_win.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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2893 if (!IsXButtonUpEvent(event)) 2893 if (!IsXButtonUpEvent(event))
2894 event->SetHandled(); 2894 event->SetHandled();
2895 } 2895 }
2896 2896
2897 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) { 2897 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) {
2898 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnScrollEvent"); 2898 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnScrollEvent");
2899 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) 2899 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2900 return; 2900 return;
2901 2901
2902 if (event->type() == ui::ET_SCROLL) { 2902 if (event->type() == ui::ET_SCROLL) {
2903 #if !defined(OS_WIN)
2904 // TODO(ananta)
2905 // Investigate if this is true for Windows 8 Metro ASH as well.
2903 if (event->finger_count() != 2) 2906 if (event->finger_count() != 2)
2904 return; 2907 return;
2908 #endif
2905 blink::WebGestureEvent gesture_event = 2909 blink::WebGestureEvent gesture_event =
2906 MakeWebGestureEventFlingCancel(); 2910 MakeWebGestureEventFlingCancel();
2907 host_->ForwardGestureEvent(gesture_event); 2911 host_->ForwardGestureEvent(gesture_event);
2908 blink::WebMouseWheelEvent mouse_wheel_event = 2912 blink::WebMouseWheelEvent mouse_wheel_event =
2909 MakeWebMouseWheelEvent(event); 2913 MakeWebMouseWheelEvent(event);
2910 host_->ForwardWheelEvent(mouse_wheel_event); 2914 host_->ForwardWheelEvent(mouse_wheel_event);
2911 RecordAction(UserMetricsAction("TrackpadScroll")); 2915 RecordAction(UserMetricsAction("TrackpadScroll"));
2912 } else if (event->type() == ui::ET_SCROLL_FLING_START || 2916 } else if (event->type() == ui::ET_SCROLL_FLING_START ||
2913 event->type() == ui::ET_SCROLL_FLING_CANCEL) { 2917 event->type() == ui::ET_SCROLL_FLING_CANCEL) {
2914 blink::WebGestureEvent gesture_event = 2918 blink::WebGestureEvent gesture_event =
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3539 RenderWidgetHost* widget) { 3543 RenderWidgetHost* widget) {
3540 return new RenderWidgetHostViewAura(widget); 3544 return new RenderWidgetHostViewAura(widget);
3541 } 3545 }
3542 3546
3543 // static 3547 // static
3544 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3548 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3545 GetScreenInfoForWindow(results, NULL); 3549 GetScreenInfoForWindow(results, NULL);
3546 } 3550 }
3547 3551
3548 } // namespace content 3552 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/events/win/events_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698