Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1914143002: Experimental 'purging and suspending' backgrounded tabs behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 1731
1732 void RenderThreadImpl::OnProcessBackgrounded(bool backgrounded) { 1732 void RenderThreadImpl::OnProcessBackgrounded(bool backgrounded) {
1733 ChildThreadImpl::OnProcessBackgrounded(backgrounded); 1733 ChildThreadImpl::OnProcessBackgrounded(backgrounded);
1734 1734
1735 if (backgrounded) 1735 if (backgrounded)
1736 renderer_scheduler_->OnRendererBackgrounded(); 1736 renderer_scheduler_->OnRendererBackgrounded();
1737 else 1737 else
1738 renderer_scheduler_->OnRendererForegrounded(); 1738 renderer_scheduler_->OnRendererForegrounded();
1739 } 1739 }
1740 1740
1741 void RenderThreadImpl::OnProcessPurgeAndSuspend() {
1742 ChildThreadImpl::OnProcessPurgeAndSuspend();
1743 renderer_scheduler_->OnRendererPurgeAndSuspend();
1744 }
1745
1741 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) { 1746 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) {
1742 CompositorDependencies* compositor_deps = this; 1747 CompositorDependencies* compositor_deps = this;
1743 RenderFrameImpl::CreateFrame( 1748 RenderFrameImpl::CreateFrame(
1744 params.routing_id, params.proxy_routing_id, params.opener_routing_id, 1749 params.routing_id, params.proxy_routing_id, params.opener_routing_id,
1745 params.parent_routing_id, params.previous_sibling_routing_id, 1750 params.parent_routing_id, params.previous_sibling_routing_id,
1746 params.replication_state, compositor_deps, params.widget_params, 1751 params.replication_state, compositor_deps, params.widget_params,
1747 params.frame_owner_properties); 1752 params.frame_owner_properties);
1748 } 1753 }
1749 1754
1750 void RenderThreadImpl::OnCreateNewFrameProxy( 1755 void RenderThreadImpl::OnCreateNewFrameProxy(
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 } 2114 }
2110 2115
2111 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2116 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2112 size_t erased = 2117 size_t erased =
2113 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2118 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2114 routing_id_); 2119 routing_id_);
2115 DCHECK_EQ(1u, erased); 2120 DCHECK_EQ(1u, erased);
2116 } 2121 }
2117 2122
2118 } // namespace content 2123 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698