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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 uint32_t output_surface_id, 2007 uint32_t output_surface_id,
2008 int renderer_host_id, 2008 int renderer_host_id,
2009 const cc::CompositorFrameAck& ack) { 2009 const cc::CompositorFrameAck& ack) {
2010 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id); 2010 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id);
2011 if (!host) 2011 if (!host)
2012 return; 2012 return;
2013 host->Send(new ViewMsg_SwapCompositorFrameAck( 2013 host->Send(new ViewMsg_SwapCompositorFrameAck(
2014 route_id, output_surface_id, ack)); 2014 route_id, output_surface_id, ack));
2015 } 2015 }
2016 2016
2017 // static
2018 void RenderWidgetHostImpl::SendReclaimCompositorResources(
2019 int32_t route_id,
2020 uint32_t output_surface_id,
2021 int renderer_host_id,
2022 const cc::CompositorFrameAck& ack) {
2023 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id);
2024 if (!host)
2025 return;
2026 host->Send(
2027 new ViewMsg_ReclaimCompositorResources(route_id, output_surface_id, ack));
2028 }
2029
2030 void RenderWidgetHostImpl::DelayedAutoResized() { 2017 void RenderWidgetHostImpl::DelayedAutoResized() {
2031 gfx::Size new_size = new_auto_size_; 2018 gfx::Size new_size = new_auto_size_;
2032 // Clear the new_auto_size_ since the empty value is used as a flag to 2019 // Clear the new_auto_size_ since the empty value is used as a flag to
2033 // indicate that no callback is in progress (i.e. without this line 2020 // indicate that no callback is in progress (i.e. without this line
2034 // DelayedAutoResized will not get called again). 2021 // DelayedAutoResized will not get called again).
2035 new_auto_size_.SetSize(0, 0); 2022 new_auto_size_.SetSize(0, 0);
2036 if (!auto_resize_enabled_) 2023 if (!auto_resize_enabled_)
2037 return; 2024 return;
2038 2025
2039 if (delegate_) 2026 if (delegate_)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2141 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2155 } 2142 }
2156 2143
2157 BrowserAccessibilityManager* 2144 BrowserAccessibilityManager*
2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2145 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2159 return delegate_ ? 2146 return delegate_ ?
2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2147 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2161 } 2148 }
2162 2149
2163 } // namespace content 2150 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698