OLD | NEW |
---|---|
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 Loading... | |
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) | |
sky
2014/01/10 16:43:21
Should this be an in metro mode check?
ananta
2014/01/10 18:59:21
Not sure about that. From inspection it appears th
| |
2876 if (event->finger_count() != 2) | 2877 if (event->finger_count() != 2) |
2877 return; | 2878 return; |
2879 #endif | |
2878 blink::WebGestureEvent gesture_event = | 2880 blink::WebGestureEvent gesture_event = |
2879 MakeWebGestureEventFlingCancel(); | 2881 MakeWebGestureEventFlingCancel(); |
2880 host_->ForwardGestureEvent(gesture_event); | 2882 host_->ForwardGestureEvent(gesture_event); |
2881 blink::WebMouseWheelEvent mouse_wheel_event = | 2883 blink::WebMouseWheelEvent mouse_wheel_event = |
2882 MakeWebMouseWheelEvent(event); | 2884 MakeWebMouseWheelEvent(event); |
2883 host_->ForwardWheelEvent(mouse_wheel_event); | 2885 host_->ForwardWheelEvent(mouse_wheel_event); |
2884 RecordAction(UserMetricsAction("TrackpadScroll")); | 2886 RecordAction(UserMetricsAction("TrackpadScroll")); |
2885 } else if (event->type() == ui::ET_SCROLL_FLING_START || | 2887 } else if (event->type() == ui::ET_SCROLL_FLING_START || |
2886 event->type() == ui::ET_SCROLL_FLING_CANCEL) { | 2888 event->type() == ui::ET_SCROLL_FLING_CANCEL) { |
2887 blink::WebGestureEvent gesture_event = | 2889 blink::WebGestureEvent gesture_event = |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3501 RenderWidgetHost* widget) { | 3503 RenderWidgetHost* widget) { |
3502 return new RenderWidgetHostViewAura(widget); | 3504 return new RenderWidgetHostViewAura(widget); |
3503 } | 3505 } |
3504 | 3506 |
3505 // static | 3507 // static |
3506 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3508 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3507 GetScreenInfoForWindow(results, NULL); | 3509 GetScreenInfoForWindow(results, NULL); |
3508 } | 3510 } |
3509 | 3511 |
3510 } // namespace content | 3512 } // namespace content |
OLD | NEW |