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 // 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 #include "ipc/mojo/ipc_channel_mojo.h" | 140 #include "ipc/mojo/ipc_channel_mojo.h" |
141 #include "media/base/media_switches.h" | 141 #include "media/base/media_switches.h" |
142 #include "net/url_request/url_request_context_getter.h" | 142 #include "net/url_request/url_request_context_getter.h" |
143 #include "ppapi/shared_impl/ppapi_switches.h" | 143 #include "ppapi/shared_impl/ppapi_switches.h" |
144 #include "third_party/skia/include/core/SkBitmap.h" | 144 #include "third_party/skia/include/core/SkBitmap.h" |
145 #include "ui/base/ui_base_switches.h" | 145 #include "ui/base/ui_base_switches.h" |
146 #include "ui/events/event_switches.h" | 146 #include "ui/events/event_switches.h" |
147 #include "ui/gfx/switches.h" | 147 #include "ui/gfx/switches.h" |
148 #include "ui/gl/gl_switches.h" | 148 #include "ui/gl/gl_switches.h" |
149 #include "ui/native_theme/native_theme_switches.h" | 149 #include "ui/native_theme/native_theme_switches.h" |
150 #include "webkit/browser/blob/blob_storage_context.h" | |
150 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 151 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
151 | 152 |
152 #if defined(OS_ANDROID) | 153 #if defined(OS_ANDROID) |
153 #include "content/browser/media/android/browser_demuxer_android.h" | 154 #include "content/browser/media/android/browser_demuxer_android.h" |
154 #include "content/browser/renderer_host/compositor_impl_android.h" | 155 #include "content/browser/renderer_host/compositor_impl_android.h" |
155 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" | 156 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" |
156 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 157 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
157 #endif | 158 #endif |
158 | 159 |
159 #if defined(OS_MACOSX) | 160 #if defined(OS_MACOSX) |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
842 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); | 843 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); |
843 | 844 |
844 message_port_message_filter_ = new MessagePortMessageFilter( | 845 message_port_message_filter_ = new MessagePortMessageFilter( |
845 base::Bind(&RenderWidgetHelper::GetNextRoutingID, | 846 base::Bind(&RenderWidgetHelper::GetNextRoutingID, |
846 base::Unretained(widget_helper_.get()))); | 847 base::Unretained(widget_helper_.get()))); |
847 AddFilter(message_port_message_filter_); | 848 AddFilter(message_port_message_filter_); |
848 | 849 |
849 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = | 850 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = |
850 new ServiceWorkerDispatcherHost(GetID(), message_port_message_filter_); | 851 new ServiceWorkerDispatcherHost(GetID(), message_port_message_filter_); |
851 service_worker_filter->Init( | 852 service_worker_filter->Init( |
852 storage_partition_impl_->GetServiceWorkerContext()); | 853 storage_partition_impl_->GetServiceWorkerContext(), |
854 storage_partition_impl_->GetURLRequestContext()->GetURLRequestContext(), | |
michaeln
2014/08/13 00:11:28
don't think you can access the unwrapped instance
jkarlin
2014/08/13 00:34:40
Done.
| |
855 ChromeBlobStorageContext::GetFor(browser_context)); | |
853 AddFilter(service_worker_filter); | 856 AddFilter(service_worker_filter); |
854 | 857 |
855 AddFilter(new SharedWorkerMessageFilter( | 858 AddFilter(new SharedWorkerMessageFilter( |
856 GetID(), | 859 GetID(), |
857 resource_context, | 860 resource_context, |
858 WorkerStoragePartition( | 861 WorkerStoragePartition( |
859 storage_partition_impl_->GetURLRequestContext(), | 862 storage_partition_impl_->GetURLRequestContext(), |
860 storage_partition_impl_->GetMediaURLRequestContext(), | 863 storage_partition_impl_->GetMediaURLRequestContext(), |
861 storage_partition_impl_->GetAppCacheService(), | 864 storage_partition_impl_->GetAppCacheService(), |
862 storage_partition_impl_->GetQuotaManager(), | 865 storage_partition_impl_->GetQuotaManager(), |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2345 } | 2348 } |
2346 | 2349 |
2347 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2350 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
2348 gfx::GpuMemoryBufferType type, | 2351 gfx::GpuMemoryBufferType type, |
2349 const gfx::GpuMemoryBufferId& id) { | 2352 const gfx::GpuMemoryBufferId& id) { |
2350 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2353 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2351 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2354 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
2352 } | 2355 } |
2353 | 2356 |
2354 } // namespace content | 2357 } // namespace content |
OLD | NEW |