| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 WebSize size_; | 257 WebSize size_; |
| 258 | 258 |
| 259 DISALLOW_COPY_AND_ASSIGN(PepperWidget); | 259 DISALLOW_COPY_AND_ASSIGN(PepperWidget); |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 } // anonymous namespace | 262 } // anonymous namespace |
| 263 | 263 |
| 264 // static | 264 // static |
| 265 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( | 265 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( |
| 266 int32 opener_id, | 266 int32 opener_id, |
| 267 CompositorDependencies* compositor_deps, |
| 267 PepperPluginInstanceImpl* plugin, | 268 PepperPluginInstanceImpl* plugin, |
| 268 const GURL& active_url, | 269 const GURL& active_url, |
| 269 const blink::WebScreenInfo& screen_info) { | 270 const blink::WebScreenInfo& screen_info) { |
| 270 DCHECK_NE(MSG_ROUTING_NONE, opener_id); | 271 DCHECK_NE(MSG_ROUTING_NONE, opener_id); |
| 271 scoped_refptr<RenderWidgetFullscreenPepper> widget( | 272 scoped_refptr<RenderWidgetFullscreenPepper> widget( |
| 272 new RenderWidgetFullscreenPepper(plugin, active_url, screen_info)); | 273 new RenderWidgetFullscreenPepper(plugin, active_url, screen_info)); |
| 273 widget->Init(opener_id); | 274 widget->Init(opener_id, compositor_deps); |
| 274 widget->AddRef(); | 275 widget->AddRef(); |
| 275 return widget.get(); | 276 return widget.get(); |
| 276 } | 277 } |
| 277 | 278 |
| 278 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( | 279 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( |
| 279 PepperPluginInstanceImpl* plugin, | 280 PepperPluginInstanceImpl* plugin, |
| 280 const GURL& active_url, | 281 const GURL& active_url, |
| 281 const blink::WebScreenInfo& screen_info) | 282 const blink::WebScreenInfo& screen_info) |
| 282 : RenderWidgetFullscreen(screen_info), | 283 : RenderWidgetFullscreen(screen_info), |
| 283 active_url_(active_url), | 284 active_url_(active_url), |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 388 } |
| 388 | 389 |
| 389 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 390 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 390 float device_scale_factor) { | 391 float device_scale_factor) { |
| 391 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 392 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 392 if (compositor_) | 393 if (compositor_) |
| 393 compositor_->setDeviceScaleFactor(device_scale_factor); | 394 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 394 } | 395 } |
| 395 | 396 |
| 396 } // namespace content | 397 } // namespace content |
| OLD | NEW |