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

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

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); 186 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
187 } 187 }
188 188
189 void RemoveShaderInfo(int32 id) { 189 void RemoveShaderInfo(int32 id) {
190 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); 190 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id);
191 } 191 }
192 192
193 net::URLRequestContext* GetRequestContext( 193 net::URLRequestContext* GetRequestContext(
194 scoped_refptr<net::URLRequestContextGetter> request_context, 194 scoped_refptr<net::URLRequestContextGetter> request_context,
195 scoped_refptr<net::URLRequestContextGetter> media_request_context, 195 scoped_refptr<net::URLRequestContextGetter> media_request_context,
196 ResourceType::Type resource_type) { 196 ResourceType resource_type) {
197 // If the request has resource type of ResourceType::MEDIA, we use a request 197 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request
198 // context specific to media for handling it because these resources have 198 // context specific to media for handling it because these resources have
199 // specific needs for caching. 199 // specific needs for caching.
200 if (resource_type == ResourceType::MEDIA) 200 if (resource_type == RESOURCE_TYPE_MEDIA)
201 return media_request_context->GetURLRequestContext(); 201 return media_request_context->GetURLRequestContext();
202 return request_context->GetURLRequestContext(); 202 return request_context->GetURLRequestContext();
203 } 203 }
204 204
205 void GetContexts( 205 void GetContexts(
206 ResourceContext* resource_context, 206 ResourceContext* resource_context,
207 scoped_refptr<net::URLRequestContextGetter> request_context, 207 scoped_refptr<net::URLRequestContextGetter> request_context,
208 scoped_refptr<net::URLRequestContextGetter> media_request_context, 208 scoped_refptr<net::URLRequestContextGetter> media_request_context,
209 const ResourceHostMsg_Request& request, 209 const ResourceHostMsg_Request& request,
210 ResourceContext** resource_context_out, 210 ResourceContext** resource_context_out,
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 media_request_context)); 810 media_request_context));
811 811
812 SocketStreamDispatcherHost* socket_stream_dispatcher_host = 812 SocketStreamDispatcherHost* socket_stream_dispatcher_host =
813 new SocketStreamDispatcherHost( 813 new SocketStreamDispatcherHost(
814 GetID(), request_context_callback, resource_context); 814 GetID(), request_context_callback, resource_context);
815 AddFilter(socket_stream_dispatcher_host); 815 AddFilter(socket_stream_dispatcher_host);
816 816
817 WebSocketDispatcherHost::GetRequestContextCallback 817 WebSocketDispatcherHost::GetRequestContextCallback
818 websocket_request_context_callback( 818 websocket_request_context_callback(
819 base::Bind(&GetRequestContext, request_context, 819 base::Bind(&GetRequestContext, request_context,
820 media_request_context, ResourceType::SUB_RESOURCE)); 820 media_request_context, RESOURCE_TYPE_SUB_RESOURCE));
821 821
822 AddFilter( 822 AddFilter(
823 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); 823 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback));
824 824
825 message_port_message_filter_ = new MessagePortMessageFilter( 825 message_port_message_filter_ = new MessagePortMessageFilter(
826 base::Bind(&RenderWidgetHelper::GetNextRoutingID, 826 base::Bind(&RenderWidgetHelper::GetNextRoutingID,
827 base::Unretained(widget_helper_.get()))); 827 base::Unretained(widget_helper_.get())));
828 AddFilter(message_port_message_filter_); 828 AddFilter(message_port_message_filter_);
829 829
830 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = 830 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter =
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 } 2326 }
2327 2327
2328 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( 2328 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer(
2329 gfx::GpuMemoryBufferType type, 2329 gfx::GpuMemoryBufferType type,
2330 const gfx::GpuMemoryBufferId& id) { 2330 const gfx::GpuMemoryBufferId& id) {
2331 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2331 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2332 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); 2332 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle());
2333 } 2333 }
2334 2334
2335 } // namespace content 2335 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_scheduler_unittest.cc ('k') | content/browser/renderer_host/socket_stream_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698