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

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') | ui/views/win/hwnd_message_handler.cc » ('J')
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 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 if (!IsXButtonUpEvent(event)) 2866 if (!IsXButtonUpEvent(event))
2867 event->SetHandled(); 2867 event->SetHandled();
2868 } 2868 }
2869 2869
2870 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) { 2870 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) {
2871 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnScrollEvent"); 2871 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnScrollEvent");
2872 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) 2872 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2873 return; 2873 return;
2874 2874
2875 if (event->type() == ui::ET_SCROLL) { 2875 if (event->type() == ui::ET_SCROLL) {
2876 #if !defined(OS_WIN)
2877 // TODO(ananta)
2878 // Investigate if this is true for Windows 8 Metro ASH as well.
2876 if (event->finger_count() != 2) 2879 if (event->finger_count() != 2)
2877 return; 2880 return;
2881 #endif
2878 blink::WebGestureEvent gesture_event = 2882 blink::WebGestureEvent gesture_event =
2879 MakeWebGestureEventFlingCancel(); 2883 MakeWebGestureEventFlingCancel();
2880 host_->ForwardGestureEvent(gesture_event); 2884 host_->ForwardGestureEvent(gesture_event);
2881 blink::WebMouseWheelEvent mouse_wheel_event = 2885 blink::WebMouseWheelEvent mouse_wheel_event =
2882 MakeWebMouseWheelEvent(event); 2886 MakeWebMouseWheelEvent(event);
2883 host_->ForwardWheelEvent(mouse_wheel_event); 2887 host_->ForwardWheelEvent(mouse_wheel_event);
2884 RecordAction(UserMetricsAction("TrackpadScroll")); 2888 RecordAction(UserMetricsAction("TrackpadScroll"));
2885 } else if (event->type() == ui::ET_SCROLL_FLING_START || 2889 } else if (event->type() == ui::ET_SCROLL_FLING_START ||
2886 event->type() == ui::ET_SCROLL_FLING_CANCEL) { 2890 event->type() == ui::ET_SCROLL_FLING_CANCEL) {
2887 blink::WebGestureEvent gesture_event = 2891 blink::WebGestureEvent gesture_event =
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 RenderWidgetHost* widget) { 3505 RenderWidgetHost* widget) {
3502 return new RenderWidgetHostViewAura(widget); 3506 return new RenderWidgetHostViewAura(widget);
3503 } 3507 }
3504 3508
3505 // static 3509 // static
3506 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3510 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3507 GetScreenInfoForWindow(results, NULL); 3511 GetScreenInfoForWindow(results, NULL);
3508 } 3512 }
3509 3513
3510 } // namespace content 3514 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/events/win/events_win.cc » ('j') | ui/views/win/hwnd_message_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698