| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 void RenderWidgetFullscreenPepper::Invalidate() { | 293 void RenderWidgetFullscreenPepper::Invalidate() { |
| 294 InvalidateRect(gfx::Rect(size_.width(), size_.height())); | 294 InvalidateRect(gfx::Rect(size_.width(), size_.height())); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void RenderWidgetFullscreenPepper::InvalidateRect(const blink::WebRect& rect) { | 297 void RenderWidgetFullscreenPepper::InvalidateRect(const blink::WebRect& rect) { |
| 298 didInvalidateRect(rect); | 298 didInvalidateRect(rect); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void RenderWidgetFullscreenPepper::ScrollRect( | 301 void RenderWidgetFullscreenPepper::ScrollRect( |
| 302 int dx, int dy, const blink::WebRect& rect) { | 302 int dx, int dy, const blink::WebRect& rect) { |
| 303 #ifdef DID_SCROLL_RECT_DOES_NOT_EXIST |
| 304 #else |
| 303 didScrollRect(dx, dy, rect); | 305 didScrollRect(dx, dy, rect); |
| 306 #endif |
| 304 } | 307 } |
| 305 | 308 |
| 306 void RenderWidgetFullscreenPepper::Destroy() { | 309 void RenderWidgetFullscreenPepper::Destroy() { |
| 307 // This function is called by the plugin instance as it's going away, so reset | 310 // This function is called by the plugin instance as it's going away, so reset |
| 308 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close(). | 311 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close(). |
| 309 plugin_ = NULL; | 312 plugin_ = NULL; |
| 310 | 313 |
| 311 // After calling Destroy(), the plugin instance assumes that the layer is not | 314 // After calling Destroy(), the plugin instance assumes that the layer is not |
| 312 // used by us anymore, so it may destroy the layer before this object goes | 315 // used by us anymore, so it may destroy the layer before this object goes |
| 313 // away. | 316 // away. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 393 } |
| 391 | 394 |
| 392 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 395 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 393 float device_scale_factor) { | 396 float device_scale_factor) { |
| 394 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 397 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 395 if (compositor_) | 398 if (compositor_) |
| 396 compositor_->setDeviceScaleFactor(device_scale_factor); | 399 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 397 } | 400 } |
| 398 | 401 |
| 399 } // namespace content | 402 } // namespace content |
| OLD | NEW |