| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 718 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 719 switches::kDisableGpuShaderDiskCache)) { | 719 switches::kDisableGpuShaderDiskCache)) { |
| 720 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 720 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 721 base::Bind(&CacheShaderInfo, GetID(), | 721 base::Bind(&CacheShaderInfo, GetID(), |
| 722 storage_partition_impl_->GetPath())); | 722 storage_partition_impl_->GetPath())); |
| 723 } | 723 } |
| 724 | 724 |
| 725 push_messaging_manager_.reset(new PushMessagingManager( | 725 push_messaging_manager_.reset(new PushMessagingManager( |
| 726 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 726 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 727 | 727 |
| 728 AddObserver(indexed_db_factory_.get()); |
| 728 #if defined(OS_MACOSX) | 729 #if defined(OS_MACOSX) |
| 729 if (BootstrapSandboxManager::ShouldEnable()) | 730 if (BootstrapSandboxManager::ShouldEnable()) |
| 730 AddObserver(BootstrapSandboxManager::GetInstance()); | 731 AddObserver(BootstrapSandboxManager::GetInstance()); |
| 731 #endif | 732 #endif |
| 732 | 733 |
| 733 InitializeChannelProxy(); | 734 InitializeChannelProxy(); |
| 734 } | 735 } |
| 735 | 736 |
| 736 // static | 737 // static |
| 737 void RenderProcessHostImpl::ShutDownInProcessRenderer() { | 738 void RenderProcessHostImpl::ShutDownInProcessRenderer() { |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 synchronous_compositor_filter_ = | 1186 synchronous_compositor_filter_ = |
| 1186 new SynchronousCompositorBrowserFilter(GetID()); | 1187 new SynchronousCompositorBrowserFilter(GetID()); |
| 1187 AddFilter(synchronous_compositor_filter_.get()); | 1188 AddFilter(synchronous_compositor_filter_.get()); |
| 1188 #endif | 1189 #endif |
| 1189 } | 1190 } |
| 1190 | 1191 |
| 1191 void RenderProcessHostImpl::RegisterMojoInterfaces() { | 1192 void RenderProcessHostImpl::RegisterMojoInterfaces() { |
| 1192 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); | 1193 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); |
| 1193 | 1194 |
| 1194 channel_->AddAssociatedInterfaceForIOThread( | 1195 channel_->AddAssociatedInterfaceForIOThread( |
| 1195 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); | 1196 base::Bind(&IndexedDBDispatcherHost::AddBinding, |
| 1197 base::Unretained(indexed_db_factory_.get()))); |
| 1196 | 1198 |
| 1197 #if defined(OS_ANDROID) | 1199 #if defined(OS_ANDROID) |
| 1198 AddUIThreadInterface( | 1200 AddUIThreadInterface( |
| 1199 registry.get(), GetGlobalJavaInterfaces() | 1201 registry.get(), GetGlobalJavaInterfaces() |
| 1200 ->CreateInterfaceFactory< | 1202 ->CreateInterfaceFactory< |
| 1201 shape_detection::mojom::FaceDetectionProvider>()); | 1203 shape_detection::mojom::FaceDetectionProvider>()); |
| 1202 AddUIThreadInterface( | 1204 AddUIThreadInterface( |
| 1203 registry.get(), | 1205 registry.get(), |
| 1204 GetGlobalJavaInterfaces() | 1206 GetGlobalJavaInterfaces() |
| 1205 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>()); | 1207 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>()); |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3058 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3060 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3059 | 3061 |
| 3060 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3062 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3061 // Capture the error message in a crash key value. | 3063 // Capture the error message in a crash key value. |
| 3062 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3064 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3063 bad_message::ReceivedBadMessage(render_process_id, | 3065 bad_message::ReceivedBadMessage(render_process_id, |
| 3064 bad_message::RPH_MOJO_PROCESS_ERROR); | 3066 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3065 } | 3067 } |
| 3066 | 3068 |
| 3067 } // namespace content | 3069 } // namespace content |
| OLD | NEW |