| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 } // anonymous namespace | 251 } // anonymous namespace |
| 252 | 252 |
| 253 // static | 253 // static |
| 254 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( | 254 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( |
| 255 int32_t opener_id, | 255 int32_t opener_id, |
| 256 CompositorDependencies* compositor_deps, | 256 CompositorDependencies* compositor_deps, |
| 257 PepperPluginInstanceImpl* plugin, | 257 PepperPluginInstanceImpl* plugin, |
| 258 const GURL& active_url, | 258 const GURL& active_url, |
| 259 const ScreenInfo& screen_info) { | 259 const ScreenInfo& screen_info, |
| 260 const cc::FrameSinkId& frame_sink_id) { |
| 260 DCHECK_NE(MSG_ROUTING_NONE, opener_id); | 261 DCHECK_NE(MSG_ROUTING_NONE, opener_id); |
| 261 scoped_refptr<RenderWidgetFullscreenPepper> widget( | 262 scoped_refptr<RenderWidgetFullscreenPepper> widget( |
| 262 new RenderWidgetFullscreenPepper(compositor_deps, plugin, active_url, | 263 new RenderWidgetFullscreenPepper(compositor_deps, plugin, active_url, |
| 263 screen_info)); | 264 screen_info, frame_sink_id)); |
| 264 widget->Init(opener_id); | 265 widget->Init(opener_id); |
| 265 widget->AddRef(); | 266 widget->AddRef(); |
| 266 return widget.get(); | 267 return widget.get(); |
| 267 } | 268 } |
| 268 | 269 |
| 269 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( | 270 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( |
| 270 CompositorDependencies* compositor_deps, | 271 CompositorDependencies* compositor_deps, |
| 271 PepperPluginInstanceImpl* plugin, | 272 PepperPluginInstanceImpl* plugin, |
| 272 const GURL& active_url, | 273 const GURL& active_url, |
| 273 const ScreenInfo& screen_info) | 274 const ScreenInfo& screen_info, |
| 274 : RenderWidgetFullscreen(compositor_deps, screen_info), | 275 const cc::FrameSinkId& frame_sink_id) |
| 276 : RenderWidgetFullscreen(compositor_deps, screen_info, frame_sink_id), |
| 275 active_url_(active_url), | 277 active_url_(active_url), |
| 276 plugin_(plugin), | 278 plugin_(plugin), |
| 277 layer_(NULL), | 279 layer_(NULL), |
| 278 mouse_lock_dispatcher_(new FullscreenMouseLockDispatcher(this)) {} | 280 mouse_lock_dispatcher_(new FullscreenMouseLockDispatcher(this)) {} |
| 279 | 281 |
| 280 RenderWidgetFullscreenPepper::~RenderWidgetFullscreenPepper() { | 282 RenderWidgetFullscreenPepper::~RenderWidgetFullscreenPepper() { |
| 281 } | 283 } |
| 282 | 284 |
| 283 void RenderWidgetFullscreenPepper::Invalidate() { | 285 void RenderWidgetFullscreenPepper::Invalidate() { |
| 284 InvalidateRect(gfx::Rect(size_.width(), size_.height())); | 286 InvalidateRect(gfx::Rect(size_.width(), size_.height())); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { | 376 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { |
| 375 return active_url_; | 377 return active_url_; |
| 376 } | 378 } |
| 377 | 379 |
| 378 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { | 380 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { |
| 379 if (compositor_) | 381 if (compositor_) |
| 380 compositor_->setDeviceScaleFactor(device_scale_factor_); | 382 compositor_->setDeviceScaleFactor(device_scale_factor_); |
| 381 } | 383 } |
| 382 | 384 |
| 383 } // namespace content | 385 } // namespace content |
| OLD | NEW |