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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 aura::GestureEvent* event) { | 1284 aura::GestureEvent* event) { |
1285 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); | 1285 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); |
1286 // Pinch gestures are currently disabled by default. See crbug.com/128477. | 1286 // Pinch gestures are currently disabled by default. See crbug.com/128477. |
1287 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || | 1287 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || |
1288 event->type() == ui::ET_GESTURE_PINCH_UPDATE || | 1288 event->type() == ui::ET_GESTURE_PINCH_UPDATE || |
1289 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { | 1289 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { |
1290 return ui::GESTURE_STATUS_CONSUMED; | 1290 return ui::GESTURE_STATUS_CONSUMED; |
1291 } | 1291 } |
1292 | 1292 |
1293 RenderViewHostDelegate* delegate = NULL; | 1293 RenderViewHostDelegate* delegate = NULL; |
1294 if (popup_type_ == WebKit::WebPopupTypeNone) | 1294 if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_) |
1295 delegate = RenderViewHost::From(host_)->GetDelegate(); | 1295 delegate = RenderViewHost::From(host_)->GetDelegate(); |
1296 if (delegate && event->type() == ui::ET_GESTURE_BEGIN && | 1296 if (delegate && event->type() == ui::ET_GESTURE_BEGIN && |
1297 event->details().touch_points() == 1) { | 1297 event->details().touch_points() == 1) { |
1298 delegate->HandleGestureBegin(); | 1298 delegate->HandleGestureBegin(); |
1299 } | 1299 } |
1300 | 1300 |
1301 WebKit::WebGestureEvent gesture = MakeWebGestureEvent(event); | 1301 WebKit::WebGestureEvent gesture = MakeWebGestureEvent(event); |
1302 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { | 1302 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { |
1303 // Webkit does not stop a fling-scroll on tap-down. So explicitly send an | 1303 // Webkit does not stop a fling-scroll on tap-down. So explicitly send an |
1304 // event to stop any in-progress flings. | 1304 // event to stop any in-progress flings. |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 RenderWidgetHost* widget) { | 1642 RenderWidgetHost* widget) { |
1643 return new RenderWidgetHostViewAura(widget); | 1643 return new RenderWidgetHostViewAura(widget); |
1644 } | 1644 } |
1645 | 1645 |
1646 // static | 1646 // static |
1647 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1647 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
1648 GetScreenInfoForWindow(results, NULL); | 1648 GetScreenInfoForWindow(results, NULL); |
1649 } | 1649 } |
1650 | 1650 |
1651 } // namespace content | 1651 } // namespace content |
OLD | NEW |