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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "base/sys_info.h" | 46 #include "base/sys_info.h" |
47 #include "base/threading/thread.h" | 47 #include "base/threading/thread.h" |
48 #include "base/threading/thread_restrictions.h" | 48 #include "base/threading/thread_restrictions.h" |
49 #include "base/threading/thread_task_runner_handle.h" | 49 #include "base/threading/thread_task_runner_handle.h" |
50 #include "base/trace_event/trace_event.h" | 50 #include "base/trace_event/trace_event.h" |
51 #include "base/tracked_objects.h" | 51 #include "base/tracked_objects.h" |
52 #include "build/build_config.h" | 52 #include "build/build_config.h" |
53 #include "cc/base/switches.h" | 53 #include "cc/base/switches.h" |
54 #include "cc/output/buffer_to_texture_target_map.h" | 54 #include "cc/output/buffer_to_texture_target_map.h" |
55 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" | 55 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
| 56 #include "components/metrics/single_sample_metrics.h" |
56 #include "components/tracing/common/tracing_switches.h" | 57 #include "components/tracing/common/tracing_switches.h" |
57 #include "content/browser/appcache/appcache_dispatcher_host.h" | 58 #include "content/browser/appcache/appcache_dispatcher_host.h" |
58 #include "content/browser/appcache/chrome_appcache_service.h" | 59 #include "content/browser/appcache/chrome_appcache_service.h" |
59 #include "content/browser/background_fetch/background_fetch_service_impl.h" | 60 #include "content/browser/background_fetch/background_fetch_service_impl.h" |
60 #include "content/browser/background_sync/background_sync_service_impl.h" | 61 #include "content/browser/background_sync/background_sync_service_impl.h" |
61 #include "content/browser/bad_message.h" | 62 #include "content/browser/bad_message.h" |
62 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 63 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
63 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 64 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
64 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 65 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
65 #include "content/browser/browser_child_process_host_impl.h" | 66 #include "content/browser/browser_child_process_host_impl.h" |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 make_scoped_refptr( | 1323 make_scoped_refptr( |
1323 storage_partition_impl_->GetBackgroundFetchContext()))); | 1324 storage_partition_impl_->GetBackgroundFetchContext()))); |
1324 | 1325 |
1325 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, | 1326 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, |
1326 base::Unretained(this))); | 1327 base::Unretained(this))); |
1327 | 1328 |
1328 registry->AddInterface( | 1329 registry->AddInterface( |
1329 base::Bind(&VideoCaptureHost::Create, | 1330 base::Bind(&VideoCaptureHost::Create, |
1330 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1331 BrowserMainLoop::GetInstance()->media_stream_manager())); |
1331 | 1332 |
| 1333 registry->AddInterface( |
| 1334 base::Bind(&metrics::CreateSingleSampleMetricsProvider)); |
| 1335 |
1332 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { | 1336 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { |
1333 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( | 1337 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
1334 static_cast<ServiceWorkerContextWrapper*>( | 1338 static_cast<ServiceWorkerContextWrapper*>( |
1335 storage_partition_impl_->GetServiceWorkerContext())); | 1339 storage_partition_impl_->GetServiceWorkerContext())); |
1336 registry->AddInterface( | 1340 registry->AddInterface( |
1337 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), | 1341 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), |
1338 resource_message_filter_, service_worker_context)); | 1342 resource_message_filter_, service_worker_context)); |
1339 } | 1343 } |
1340 | 1344 |
1341 // This is to support usage of WebSockets in cases in which there is no | 1345 // This is to support usage of WebSockets in cases in which there is no |
(...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3145 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3142 | 3146 |
3143 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3147 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3144 // Capture the error message in a crash key value. | 3148 // Capture the error message in a crash key value. |
3145 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3149 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3146 bad_message::ReceivedBadMessage(render_process_id, | 3150 bad_message::ReceivedBadMessage(render_process_id, |
3147 bad_message::RPH_MOJO_PROCESS_ERROR); | 3151 bad_message::RPH_MOJO_PROCESS_ERROR); |
3148 } | 3152 } |
3149 | 3153 |
3150 } // namespace content | 3154 } // namespace content |
OLD | NEW |