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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return; | 145 return; |
146 | 146 |
147 size_ = size; | 147 size_ = size; |
148 WebRect plugin_rect(0, 0, size_.width, size_.height); | 148 WebRect plugin_rect(0, 0, size_.width, size_.height); |
149 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect); | 149 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect); |
150 widget_->Invalidate(); | 150 widget_->Invalidate(); |
151 } | 151 } |
152 | 152 |
153 void themeChanged() override { NOTIMPLEMENTED(); } | 153 void themeChanged() override { NOTIMPLEMENTED(); } |
154 | 154 |
155 WebInputEventResult handleInputEvent(const WebInputEvent& event) override { | 155 WebInputEventResult handleInputEvent( |
| 156 const blink::CoalescedWebInputEvent& coalescedEvent) override { |
156 if (!widget_->plugin()) | 157 if (!widget_->plugin()) |
157 return WebInputEventResult::NotHandled; | 158 return WebInputEventResult::NotHandled; |
| 159 const WebInputEvent& event = coalescedEvent.event(); |
158 | 160 |
159 // This cursor info is ignored, we always set the cursor directly from | 161 // This cursor info is ignored, we always set the cursor directly from |
160 // RenderWidgetFullscreenPepper::DidChangeCursor. | 162 // RenderWidgetFullscreenPepper::DidChangeCursor. |
161 WebCursorInfo cursor; | 163 WebCursorInfo cursor; |
162 | 164 |
163 // Pepper plugins do not accept gesture events. So do not send the gesture | 165 // Pepper plugins do not accept gesture events. So do not send the gesture |
164 // events directly to the plugin. Instead, try to convert them to equivalent | 166 // events directly to the plugin. Instead, try to convert them to equivalent |
165 // mouse events, and then send to the plugin. | 167 // mouse events, and then send to the plugin. |
166 if (WebInputEvent::isGestureEventType(event.type)) { | 168 if (WebInputEvent::isGestureEventType(event.type)) { |
167 bool result = false; | 169 bool result = false; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { | 377 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { |
376 return active_url_; | 378 return active_url_; |
377 } | 379 } |
378 | 380 |
379 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { | 381 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { |
380 if (compositor_) | 382 if (compositor_) |
381 compositor_->setDeviceScaleFactor(device_scale_factor_); | 383 compositor_->setDeviceScaleFactor(device_scale_factor_); |
382 } | 384 } |
383 | 385 |
384 } // namespace content | 386 } // namespace content |
OLD | NEW |