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

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

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some (incomplete) work on struct traits. 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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 64 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
65 #include "content/browser/dom_storage/dom_storage_message_filter.h" 65 #include "content/browser/dom_storage/dom_storage_message_filter.h"
66 #include "content/browser/fileapi/fileapi_message_filter.h" 66 #include "content/browser/fileapi/fileapi_message_filter.h"
67 #include "content/browser/frame_host/render_frame_message_filter.h" 67 #include "content/browser/frame_host/render_frame_message_filter.h"
68 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 68 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
69 #include "content/browser/gpu/compositor_util.h" 69 #include "content/browser/gpu/compositor_util.h"
70 #include "content/browser/gpu/gpu_data_manager_impl.h" 70 #include "content/browser/gpu/gpu_data_manager_impl.h"
71 #include "content/browser/gpu/gpu_process_host.h" 71 #include "content/browser/gpu/gpu_process_host.h"
72 #include "content/browser/gpu/shader_disk_cache.h" 72 #include "content/browser/gpu/shader_disk_cache.h"
73 #include "content/browser/histogram_message_filter.h" 73 #include "content/browser/histogram_message_filter.h"
74 #include "content/browser/indexed_db/database_factory_impl.h"
75 #include "content/browser/indexed_db/database_impl.h"
74 #include "content/browser/indexed_db/indexed_db_context_impl.h" 76 #include "content/browser/indexed_db/indexed_db_context_impl.h"
75 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 77 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
76 #include "content/browser/loader/resource_message_filter.h" 78 #include "content/browser/loader/resource_message_filter.h"
77 #include "content/browser/loader/resource_scheduler_filter.h" 79 #include "content/browser/loader/resource_scheduler_filter.h"
78 #include "content/browser/media/capture/audio_mirroring_manager.h" 80 #include "content/browser/media/capture/audio_mirroring_manager.h"
79 #include "content/browser/media/capture/image_capture_impl.h" 81 #include "content/browser/media/capture/image_capture_impl.h"
80 #include "content/browser/media/media_internals.h" 82 #include "content/browser/media/media_internals.h"
81 #include "content/browser/media/midi_host.h" 83 #include "content/browser/media/midi_host.h"
82 #include "content/browser/memory/memory_message_filter.h" 84 #include "content/browser/memory/memory_message_filter.h"
83 #include "content/browser/message_port_message_filter.h" 85 #include "content/browser/message_port_message_filter.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 browser_context->GetResourceContext()->GetMediaDeviceIDSalt()); 924 browser_context->GetResourceContext()->GetMediaDeviceIDSalt());
923 AddFilter(audio_renderer_host_.get()); 925 AddFilter(audio_renderer_host_.get());
924 AddFilter( 926 AddFilter(
925 new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager())); 927 new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
926 AddFilter(new VideoCaptureHost(media_stream_manager)); 928 AddFilter(new VideoCaptureHost(media_stream_manager));
927 AddFilter(new AppCacheDispatcherHost( 929 AddFilter(new AppCacheDispatcherHost(
928 storage_partition_impl_->GetAppCacheService(), GetID())); 930 storage_partition_impl_->GetAppCacheService(), GetID()));
929 AddFilter(new ClipboardMessageFilter(blob_storage_context)); 931 AddFilter(new ClipboardMessageFilter(blob_storage_context));
930 AddFilter(new DOMStorageMessageFilter( 932 AddFilter(new DOMStorageMessageFilter(
931 storage_partition_impl_->GetDOMStorageContext())); 933 storage_partition_impl_->GetDOMStorageContext()));
934 #if 0
932 AddFilter(new IndexedDBDispatcherHost( 935 AddFilter(new IndexedDBDispatcherHost(
933 GetID(), storage_partition_impl_->GetURLRequestContext(), 936 GetID(), storage_partition_impl_->GetURLRequestContext(),
934 storage_partition_impl_->GetIndexedDBContext(), 937 storage_partition_impl_->GetIndexedDBContext(),
935 blob_storage_context.get())); 938 blob_storage_context.get()));
939 #endif
936 940
937 #if defined(ENABLE_WEBRTC) 941 #if defined(ENABLE_WEBRTC)
938 peer_connection_tracker_host_ = 942 peer_connection_tracker_host_ =
939 new PeerConnectionTrackerHost(GetID(), &webrtc_eventlog_host_); 943 new PeerConnectionTrackerHost(GetID(), &webrtc_eventlog_host_);
940 AddFilter(peer_connection_tracker_host_.get()); 944 AddFilter(peer_connection_tracker_host_.get());
941 AddFilter(new MediaStreamDispatcherHost( 945 AddFilter(new MediaStreamDispatcherHost(
942 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), 946 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(),
943 media_stream_manager)); 947 media_stream_manager));
944 AddFilter(new MediaStreamTrackMetricsHost()); 948 AddFilter(new MediaStreamTrackMetricsHost());
945 #endif 949 #endif
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); 1088 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
1085 GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceLightHost::Create), 1089 GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceLightHost::Create),
1086 io_task_runner); 1090 io_task_runner);
1087 GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceMotionHost::Create), 1091 GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceMotionHost::Create),
1088 io_task_runner); 1092 io_task_runner);
1089 GetInterfaceRegistry()->AddInterface( 1093 GetInterfaceRegistry()->AddInterface(
1090 base::Bind(&DeviceOrientationHost::Create), io_task_runner); 1094 base::Bind(&DeviceOrientationHost::Create), io_task_runner);
1091 GetInterfaceRegistry()->AddInterface( 1095 GetInterfaceRegistry()->AddInterface(
1092 base::Bind(&DeviceOrientationAbsoluteHost::Create), io_task_runner); 1096 base::Bind(&DeviceOrientationAbsoluteHost::Create), io_task_runner);
1093 1097
1098 GetInterfaceRegistry()->AddInterface(base::Bind(
1099 &::indexed_db::DatabaseFactoryImpl::Create,
1100 base::Unretained(GetBrowserContext()),
1101 base::RetainedRef(storage_partition_impl_->GetURLRequestContext())));
1102
1103 #if 0
1104 // Databases are created in the browser process and passed to the client.
1105 // I don't think it's correct to add this to the registry.
1106 GetInterfaceRegistry()->AddInterface(
1107 base::Bind(&::indexed_db::DatabaseImpl::Create,
1108 base::Unretained(GetBrowserContext())));
1109 #endif
1110
1094 #if defined(OS_ANDROID) 1111 #if defined(OS_ANDROID)
1095 ServiceRegistrarAndroid::RegisterProcessHostServices( 1112 ServiceRegistrarAndroid::RegisterProcessHostServices(
1096 mojo_child_connection_->service_registry_android()); 1113 mojo_child_connection_->service_registry_android());
1097 #endif 1114 #endif
1098 1115
1099 GetContentClient()->browser()->ExposeInterfacesToRenderer( 1116 GetContentClient()->browser()->ExposeInterfacesToRenderer(
1100 GetInterfaceRegistry(), this); 1117 GetInterfaceRegistry(), this);
1101 } 1118 }
1102 1119
1103 void RenderProcessHostImpl::CreateStoragePartitionService( 1120 void RenderProcessHostImpl::CreateStoragePartitionService(
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2777 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2761 2778
2762 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 2779 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
2763 // enough information here so that we can determine what the bad message was. 2780 // enough information here so that we can determine what the bad message was.
2764 base::debug::Alias(&error); 2781 base::debug::Alias(&error);
2765 bad_message::ReceivedBadMessage(process.get(), 2782 bad_message::ReceivedBadMessage(process.get(),
2766 bad_message::RPH_MOJO_PROCESS_ERROR); 2783 bad_message::RPH_MOJO_PROCESS_ERROR);
2767 } 2784 }
2768 2785
2769 } // namespace content 2786 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698