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/logging.h" | 10 #include "base/logging.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 return false; | 642 return false; |
643 } | 643 } |
644 } | 644 } |
645 | 645 |
646 // This is used to complete pending inits and non-pending inits. | 646 // This is used to complete pending inits and non-pending inits. |
647 void RenderWidget::CompleteInit() { | 647 void RenderWidget::CompleteInit() { |
648 DCHECK(routing_id_ != MSG_ROUTING_NONE); | 648 DCHECK(routing_id_ != MSG_ROUTING_NONE); |
649 | 649 |
650 init_complete_ = true; | 650 init_complete_ = true; |
651 | 651 |
| 652 // TODO(piman): do we still need the 2-stage initialization? crbug.com/535339 |
652 if (compositor_) | 653 if (compositor_) |
653 StartCompositor(); | 654 StartCompositor(); |
654 | 655 |
655 Send(new ViewHostMsg_RenderViewReady(routing_id_)); | 656 Send(new ViewHostMsg_RenderViewReady(routing_id_)); |
656 } | 657 } |
657 | 658 |
658 void RenderWidget::SetSwappedOut(bool is_swapped_out) { | 659 void RenderWidget::SetSwappedOut(bool is_swapped_out) { |
659 // We should only toggle between states. | 660 // We should only toggle between states. |
660 DCHECK(is_swapped_out_ != is_swapped_out); | 661 DCHECK(is_swapped_out_ != is_swapped_out); |
661 is_swapped_out_ = is_swapped_out; | 662 is_swapped_out_ = is_swapped_out; |
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2419 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2420 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2420 video_hole_frames_.AddObserver(frame); | 2421 video_hole_frames_.AddObserver(frame); |
2421 } | 2422 } |
2422 | 2423 |
2423 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2424 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2424 video_hole_frames_.RemoveObserver(frame); | 2425 video_hole_frames_.RemoveObserver(frame); |
2425 } | 2426 } |
2426 #endif // defined(VIDEO_HOLE) | 2427 #endif // defined(VIDEO_HOLE) |
2427 | 2428 |
2428 } // namespace content | 2429 } // namespace content |
OLD | NEW |