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_value_histograms_provider.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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 make_scoped_refptr( | 1290 make_scoped_refptr( |
1290 storage_partition_impl_->GetBackgroundFetchContext()))); | 1291 storage_partition_impl_->GetBackgroundFetchContext()))); |
1291 | 1292 |
1292 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, | 1293 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, |
1293 base::Unretained(this))); | 1294 base::Unretained(this))); |
1294 | 1295 |
1295 registry->AddInterface( | 1296 registry->AddInterface( |
1296 base::Bind(&VideoCaptureHost::Create, | 1297 base::Bind(&VideoCaptureHost::Create, |
1297 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1298 BrowserMainLoop::GetInstance()->media_stream_manager())); |
1298 | 1299 |
| 1300 registry->AddInterface( |
| 1301 base::Bind(&metrics::SingleValueHistogramsProvider::Create)); |
| 1302 |
1299 // This is to support usage of WebSockets in cases in which there is no | 1303 // This is to support usage of WebSockets in cases in which there is no |
1300 // associated RenderFrame (e.g., Shared Workers). | 1304 // associated RenderFrame (e.g., Shared Workers). |
1301 AddUIThreadInterface( | 1305 AddUIThreadInterface( |
1302 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1306 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
1303 MSG_ROUTING_NONE)); | 1307 MSG_ROUTING_NONE)); |
1304 | 1308 |
1305 // Chrome browser process only provides DiscardableSharedMemory service when | 1309 // Chrome browser process only provides DiscardableSharedMemory service when |
1306 // Chrome is not running in mus+ash. | 1310 // Chrome is not running in mus+ash. |
1307 if (!service_manager::ServiceManagerIsRemote()) { | 1311 if (!service_manager::ServiceManagerIsRemote()) { |
1308 discardable_memory::DiscardableSharedMemoryManager* manager = | 1312 discardable_memory::DiscardableSharedMemoryManager* manager = |
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3083 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3087 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3084 | 3088 |
3085 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3089 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3086 // Capture the error message in a crash key value. | 3090 // Capture the error message in a crash key value. |
3087 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3091 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3088 bad_message::ReceivedBadMessage(render_process_id, | 3092 bad_message::ReceivedBadMessage(render_process_id, |
3089 bad_message::RPH_MOJO_PROCESS_ERROR); | 3093 bad_message::RPH_MOJO_PROCESS_ERROR); |
3090 } | 3094 } |
3091 | 3095 |
3092 } // namespace content | 3096 } // namespace content |
OLD | NEW |