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 blink::WebScreenInfo& screen_info) { | 259 const ScreenInfo& screen_info) { |
260 DCHECK_NE(MSG_ROUTING_NONE, opener_id); | 260 DCHECK_NE(MSG_ROUTING_NONE, opener_id); |
261 scoped_refptr<RenderWidgetFullscreenPepper> widget( | 261 scoped_refptr<RenderWidgetFullscreenPepper> widget( |
262 new RenderWidgetFullscreenPepper(compositor_deps, plugin, active_url, | 262 new RenderWidgetFullscreenPepper(compositor_deps, plugin, active_url, |
263 screen_info)); | 263 screen_info)); |
264 widget->Init(opener_id); | 264 widget->Init(opener_id); |
265 widget->AddRef(); | 265 widget->AddRef(); |
266 return widget.get(); | 266 return widget.get(); |
267 } | 267 } |
268 | 268 |
269 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( | 269 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( |
270 CompositorDependencies* compositor_deps, | 270 CompositorDependencies* compositor_deps, |
271 PepperPluginInstanceImpl* plugin, | 271 PepperPluginInstanceImpl* plugin, |
272 const GURL& active_url, | 272 const GURL& active_url, |
273 const blink::WebScreenInfo& screen_info) | 273 const ScreenInfo& screen_info) |
274 : RenderWidgetFullscreen(compositor_deps, screen_info), | 274 : RenderWidgetFullscreen(compositor_deps, screen_info), |
275 active_url_(active_url), | 275 active_url_(active_url), |
276 plugin_(plugin), | 276 plugin_(plugin), |
277 layer_(NULL), | 277 layer_(NULL), |
278 mouse_lock_dispatcher_(new FullscreenMouseLockDispatcher(this)) {} | 278 mouse_lock_dispatcher_(new FullscreenMouseLockDispatcher(this)) {} |
279 | 279 |
280 RenderWidgetFullscreenPepper::~RenderWidgetFullscreenPepper() { | 280 RenderWidgetFullscreenPepper::~RenderWidgetFullscreenPepper() { |
281 } | 281 } |
282 | 282 |
283 void RenderWidgetFullscreenPepper::Invalidate() { | 283 void RenderWidgetFullscreenPepper::Invalidate() { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { | 374 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { |
375 return active_url_; | 375 return active_url_; |
376 } | 376 } |
377 | 377 |
378 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { | 378 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { |
379 if (compositor_) | 379 if (compositor_) |
380 compositor_->setDeviceScaleFactor(device_scale_factor_); | 380 compositor_->setDeviceScaleFactor(device_scale_factor_); |
381 } | 381 } |
382 | 382 |
383 } // namespace content | 383 } // namespace content |
OLD | NEW |