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

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

Issue 444843002: Cache the current WebPreferences on RenderViewHostImpl (try #2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added defensive code. Created 6 years, 4 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 | Annotate | Revision Log
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); 2134 RenderWidgetHostImpl::GetAllRenderWidgetHosts());
2135 while (RenderWidgetHost* widget = widgets->GetNextHost()) { 2135 while (RenderWidgetHost* widget = widgets->GetNextHost()) {
2136 if (!widget->IsRenderView()) 2136 if (!widget->IsRenderView())
2137 continue; 2137 continue;
2138 2138
2139 // Skip widgets in other processes. 2139 // Skip widgets in other processes.
2140 if (widget->GetProcess()->GetID() != GetID()) 2140 if (widget->GetProcess()->GetID() != GetID())
2141 continue; 2141 continue;
2142 2142
2143 RenderViewHost* rvh = RenderViewHost::From(widget); 2143 RenderViewHost* rvh = RenderViewHost::From(widget);
2144 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); 2144 rvh->OnWebkitPreferencesChanged();
2145 } 2145 }
2146 } 2146 }
2147 2147
2148 #if defined(ENABLE_WEBRTC) 2148 #if defined(ENABLE_WEBRTC)
2149 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { 2149 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) {
2150 BrowserThread::PostTask( 2150 BrowserThread::PostTask(
2151 BrowserThread::UI, 2151 BrowserThread::UI,
2152 FROM_HERE, 2152 FROM_HERE,
2153 base::Bind( 2153 base::Bind(
2154 &RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, 2154 &RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 } 2341 }
2342 2342
2343 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( 2343 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer(
2344 gfx::GpuMemoryBufferType type, 2344 gfx::GpuMemoryBufferType type,
2345 const gfx::GpuMemoryBufferId& id) { 2345 const gfx::GpuMemoryBufferId& id) {
2346 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2346 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2347 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); 2347 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle());
2348 } 2348 }
2349 2349
2350 } // namespace content 2350 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698