| 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/renderer/render_widget_fullscreen_pepper.h" | 5 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 switch (gesture.type) { | 68 switch (gesture.type) { |
| 69 case WebInputEvent::GestureScrollBegin: | 69 case WebInputEvent::GestureScrollBegin: |
| 70 mouse.type = WebInputEvent::MouseDown; | 70 mouse.type = WebInputEvent::MouseDown; |
| 71 break; | 71 break; |
| 72 | 72 |
| 73 case WebInputEvent::GestureScrollUpdate: | 73 case WebInputEvent::GestureScrollUpdate: |
| 74 mouse.type = WebInputEvent::MouseMove; | 74 mouse.type = WebInputEvent::MouseMove; |
| 75 break; | 75 break; |
| 76 | 76 |
| 77 case WebInputEvent::GestureFlingStart: | 77 case WebInputEvent::GestureFlingStart: |
| 78 if (gesture.sourceDevice == WebGestureEvent::Touchscreen) { | 78 if (gesture.sourceDevice == blink::WebGestureDeviceTouchpad) { |
| 79 // A scroll gesture on the touchscreen may end with a GestureScrollEnd | 79 // A scroll gesture on the touchscreen may end with a GestureScrollEnd |
| 80 // when there is no velocity, or a GestureFlingStart when it has a | 80 // when there is no velocity, or a GestureFlingStart when it has a |
| 81 // velocity. In both cases, it should end the drag that was initiated by | 81 // velocity. In both cases, it should end the drag that was initiated by |
| 82 // the GestureScrollBegin (and subsequent GestureScrollUpdate) events. | 82 // the GestureScrollBegin (and subsequent GestureScrollUpdate) events. |
| 83 mouse.type = WebInputEvent::MouseUp; | 83 mouse.type = WebInputEvent::MouseUp; |
| 84 break; | 84 break; |
| 85 } else { | 85 } else { |
| 86 return mouse; | 86 return mouse; |
| 87 } | 87 } |
| 88 case WebInputEvent::GestureScrollEnd: | 88 case WebInputEvent::GestureScrollEnd: |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 | 390 |
| 391 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 391 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 392 float device_scale_factor) { | 392 float device_scale_factor) { |
| 393 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 393 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 394 if (compositor_) | 394 if (compositor_) |
| 395 compositor_->setDeviceScaleFactor(device_scale_factor); | 395 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 396 } | 396 } |
| 397 | 397 |
| 398 } // namespace content | 398 } // namespace content |
| OLD | NEW |