| 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.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 return false; | 482 return false; |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 | 485 |
| 486 // This is used to complete pending inits and non-pending inits. | 486 // This is used to complete pending inits and non-pending inits. |
| 487 void RenderWidget::CompleteInit() { | 487 void RenderWidget::CompleteInit() { |
| 488 DCHECK(routing_id_ != MSG_ROUTING_NONE); | 488 DCHECK(routing_id_ != MSG_ROUTING_NONE); |
| 489 | 489 |
| 490 init_complete_ = true; | 490 init_complete_ = true; |
| 491 | 491 |
| 492 if (webwidget_) | |
| 493 webwidget_->enterForceCompositingMode(true); | |
| 494 if (compositor_) | 492 if (compositor_) |
| 495 StartCompositor(); | 493 StartCompositor(); |
| 496 | 494 |
| 497 Send(new ViewHostMsg_RenderViewReady(routing_id_)); | 495 Send(new ViewHostMsg_RenderViewReady(routing_id_)); |
| 498 } | 496 } |
| 499 | 497 |
| 500 void RenderWidget::SetSwappedOut(bool is_swapped_out) { | 498 void RenderWidget::SetSwappedOut(bool is_swapped_out) { |
| 501 // We should only toggle between states. | 499 // We should only toggle between states. |
| 502 DCHECK(is_swapped_out_ != is_swapped_out); | 500 DCHECK(is_swapped_out_ != is_swapped_out); |
| 503 is_swapped_out_ = is_swapped_out; | 501 is_swapped_out_ = is_swapped_out; |
| (...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2130 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2133 video_hole_frames_.AddObserver(frame); | 2131 video_hole_frames_.AddObserver(frame); |
| 2134 } | 2132 } |
| 2135 | 2133 |
| 2136 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2134 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2137 video_hole_frames_.RemoveObserver(frame); | 2135 video_hole_frames_.RemoveObserver(frame); |
| 2138 } | 2136 } |
| 2139 #endif // defined(VIDEO_HOLE) | 2137 #endif // defined(VIDEO_HOLE) |
| 2140 | 2138 |
| 2141 } // namespace content | 2139 } // namespace content |
| OLD | NEW |