| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 gfx::Rect* location, | 494 gfx::Rect* location, |
| 495 gfx::Rect* clip, | 495 gfx::Rect* clip, |
| 496 float* scale_factor) { | 496 float* scale_factor) { |
| 497 if (plugin_ && plugin_->GetBitmapForOptimizedPluginPaint( | 497 if (plugin_ && plugin_->GetBitmapForOptimizedPluginPaint( |
| 498 paint_bounds, dib, location, clip, scale_factor)) { | 498 paint_bounds, dib, location, clip, scale_factor)) { |
| 499 return plugin_; | 499 return plugin_; |
| 500 } | 500 } |
| 501 return NULL; | 501 return NULL; |
| 502 } | 502 } |
| 503 | 503 |
| 504 void RenderWidgetFullscreenPepper::OnResize(const gfx::Size& size, | 504 void RenderWidgetFullscreenPepper::OnResize( |
| 505 const gfx::Size& physical_backing_size, | 505 const ViewMsg_Resize_Params& params) { |
| 506 float overdraw_bottom_height, | |
| 507 const gfx::Rect& resizer_rect, | |
| 508 bool is_fullscreen) { | |
| 509 if (layer_) | 506 if (layer_) |
| 510 layer_->setBounds(WebKit::WebSize(size)); | 507 layer_->setBounds(WebKit::WebSize(params.new_size)); |
| 511 RenderWidget::OnResize(size, physical_backing_size, overdraw_bottom_height, | 508 RenderWidget::OnResize(params); |
| 512 resizer_rect, is_fullscreen); | |
| 513 } | 509 } |
| 514 | 510 |
| 515 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() { | 511 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() { |
| 516 return new PepperWidget(this); | 512 return new PepperWidget(this); |
| 517 } | 513 } |
| 518 | 514 |
| 519 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { | 515 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { |
| 520 return active_url_; | 516 return active_url_; |
| 521 } | 517 } |
| 522 | 518 |
| 523 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 519 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 524 float device_scale_factor) { | 520 float device_scale_factor) { |
| 525 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 521 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 526 if (compositor_) | 522 if (compositor_) |
| 527 compositor_->setDeviceScaleFactor(device_scale_factor); | 523 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 528 } | 524 } |
| 529 | 525 |
| 530 } // namespace content | 526 } // namespace content |
| OLD | NEW |