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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 | 635 |
636 init_complete_ = true; | 636 init_complete_ = true; |
637 | 637 |
638 if (compositor_) | 638 if (compositor_) |
639 StartCompositor(); | 639 StartCompositor(); |
640 | 640 |
641 Send(new ViewHostMsg_RenderViewReady(routing_id_)); | 641 Send(new ViewHostMsg_RenderViewReady(routing_id_)); |
642 } | 642 } |
643 | 643 |
644 void RenderWidget::SetSwappedOut(bool is_swapped_out) { | 644 void RenderWidget::SetSwappedOut(bool is_swapped_out) { |
| 645 LOG(ERROR) << "RW[" << this << "]::SetSwappedOut: " << is_swapped_out; |
645 // We should only toggle between states. | 646 // We should only toggle between states. |
646 DCHECK(is_swapped_out_ != is_swapped_out); | 647 DCHECK(is_swapped_out_ != is_swapped_out); |
647 is_swapped_out_ = is_swapped_out; | 648 is_swapped_out_ = is_swapped_out; |
648 | 649 |
649 // If we are swapping out, we will call ReleaseProcess, allowing the process | 650 // If we are swapping out, we will call ReleaseProcess, allowing the process |
650 // to exit if all of its RenderViews are swapped out. We wait until the | 651 // to exit if all of its RenderViews are swapped out. We wait until the |
651 // WasSwappedOut call to do this, to allow the unload handler to finish. | 652 // WasSwappedOut call to do this, to allow the unload handler to finish. |
652 // If we are swapping in, we call AddRefProcess to prevent the process from | 653 // If we are swapping in, we call AddRefProcess to prevent the process from |
653 // exiting. | 654 // exiting. |
654 if (!is_swapped_out_) | 655 if (!is_swapped_out_) |
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2450 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2451 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2451 video_hole_frames_.AddObserver(frame); | 2452 video_hole_frames_.AddObserver(frame); |
2452 } | 2453 } |
2453 | 2454 |
2454 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2455 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2455 video_hole_frames_.RemoveObserver(frame); | 2456 video_hole_frames_.RemoveObserver(frame); |
2456 } | 2457 } |
2457 #endif // defined(VIDEO_HOLE) | 2458 #endif // defined(VIDEO_HOLE) |
2458 | 2459 |
2459 } // namespace content | 2460 } // namespace content |
OLD | NEW |