| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 if (compositing != is_accelerated_compositing_active_) { | 407 if (compositing != is_accelerated_compositing_active_) { |
| 408 if (compositing) { | 408 if (compositing) { |
| 409 if (!layerTreeView()) | 409 if (!layerTreeView()) |
| 410 initializeLayerTreeView(); | 410 initializeLayerTreeView(); |
| 411 if (!layerTreeView()) | 411 if (!layerTreeView()) |
| 412 return; | 412 return; |
| 413 layer_->setBounds(blink::WebSize(size())); | 413 layer_->setBounds(blink::WebSize(size())); |
| 414 layer_->setDrawsContent(true); | 414 layer_->setDrawsContent(true); |
| 415 compositor_->setDeviceScaleFactor(device_scale_factor_); | 415 compositor_->setDeviceScaleFactor(device_scale_factor_); |
| 416 compositor_->setRootLayer(*layer_); | 416 compositor_->setRootLayer(*layer_); |
| 417 didActivateCompositor(-1); | 417 didActivateCompositor(); |
| 418 } else { | 418 } else { |
| 419 didDeactivateCompositor(); | 419 didDeactivateCompositor(); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 bool RenderWidgetFullscreenPepper::OnMessageReceived(const IPC::Message& msg) { | 424 bool RenderWidgetFullscreenPepper::OnMessageReceived(const IPC::Message& msg) { |
| 425 bool handled = true; | 425 bool handled = true; |
| 426 IPC_BEGIN_MESSAGE_MAP(RenderWidgetFullscreenPepper, msg) | 426 IPC_BEGIN_MESSAGE_MAP(RenderWidgetFullscreenPepper, msg) |
| 427 IPC_MESSAGE_FORWARD(ViewMsg_LockMouse_ACK, | 427 IPC_MESSAGE_FORWARD(ViewMsg_LockMouse_ACK, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 } | 488 } |
| 489 | 489 |
| 490 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 490 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 491 float device_scale_factor) { | 491 float device_scale_factor) { |
| 492 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 492 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 493 if (compositor_) | 493 if (compositor_) |
| 494 compositor_->setDeviceScaleFactor(device_scale_factor); | 494 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 495 } | 495 } |
| 496 | 496 |
| 497 } // namespace content | 497 } // namespace content |
| OLD | NEW |