| 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::WebGestureDeviceTouchscreen) { |
| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 390 } |
| 391 | 391 |
| 392 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 392 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 393 float device_scale_factor) { | 393 float device_scale_factor) { |
| 394 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 394 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 395 if (compositor_) | 395 if (compositor_) |
| 396 compositor_->setDeviceScaleFactor(device_scale_factor); | 396 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 397 } | 397 } |
| 398 | 398 |
| 399 } // namespace content | 399 } // namespace content |
| OLD | NEW |