Chromium Code Reviews| 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 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 326 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
| 327 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" | 327 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" |
| 328 #endif | 328 #endif |
| 329 | 329 |
| 330 #if defined(ENABLE_WEBRTC) | 330 #if defined(ENABLE_WEBRTC) |
| 331 #include "chrome/browser/media/audio_debug_recordings_handler.h" | 331 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
| 332 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" | 332 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" |
| 333 #endif | 333 #endif |
| 334 | 334 |
| 335 #if defined(ENABLE_MEDIA_ROUTER) | 335 #if defined(ENABLE_MEDIA_ROUTER) |
| 336 #include "chrome/browser/media/cast_remoting_connector.h" | |
| 337 #include "chrome/browser/media/router/media_router_feature.h" | 336 #include "chrome/browser/media/router/media_router_feature.h" |
| 338 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" | 337 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| 338 #endif // defined(ENABLE_MEDIA_ROUTER) | |
| 339 | |
| 340 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) && defined(ENABLE_MEDIA_ROUTER) | |
| 341 #include "chrome/browser/media/cast_remoting_connector.h" | |
| 339 #endif | 342 #endif |
| 340 | 343 |
| 344 | |
| 341 #if defined(ENABLE_WAYLAND_SERVER) | 345 #if defined(ENABLE_WAYLAND_SERVER) |
| 342 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 346 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
| 343 #endif | 347 #endif |
| 344 | 348 |
| 345 #if defined(ENABLE_MOJO_MEDIA) | 349 #if defined(ENABLE_MOJO_MEDIA) |
| 346 #include "chrome/browser/media/output_protection_impl.h" | 350 #include "chrome/browser/media/output_protection_impl.h" |
| 347 #endif | 351 #endif |
| 348 | 352 |
| 349 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 353 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 350 #include "media/mojo/services/media_service_factory.h" // nogncheck | 354 #include "media/mojo/services/media_service_factory.h" // nogncheck |
| (...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2973 content::WebContents::FromRenderFrameHost(render_frame_host); | 2977 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 2974 if (web_contents) { | 2978 if (web_contents) { |
| 2975 registry->AddInterface( | 2979 registry->AddInterface( |
| 2976 web_contents->GetJavaInterfaces() | 2980 web_contents->GetJavaInterfaces() |
| 2977 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); | 2981 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); |
| 2978 registry->AddInterface( | 2982 registry->AddInterface( |
| 2979 base::Bind(&ForwardShareServiceRequest, | 2983 base::Bind(&ForwardShareServiceRequest, |
| 2980 web_contents->GetJavaInterfaces()->GetWeakPtr())); | 2984 web_contents->GetJavaInterfaces()->GetWeakPtr())); |
| 2981 } | 2985 } |
| 2982 #endif | 2986 #endif |
| 2983 | |
| 2984 #if defined(ENABLE_MEDIA_ROUTER) | |
| 2985 registry->AddInterface( | |
| 2986 base::Bind(&CastRemotingConnector::CreateRemoterFactory, | |
| 2987 render_frame_host)); | |
| 2988 #endif | |
| 2989 } | 2987 } |
| 2990 | 2988 |
| 2991 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( | 2989 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( |
| 2992 service_manager::InterfaceRegistry* registry, | 2990 service_manager::InterfaceRegistry* registry, |
| 2993 content::GpuProcessHost* render_process_host) { | 2991 content::GpuProcessHost* render_process_host) { |
| 2994 registry->AddInterface( | 2992 registry->AddInterface( |
| 2995 base::Bind(&metrics::CallStackProfileCollector::Create, | 2993 base::Bind(&metrics::CallStackProfileCollector::Create, |
| 2996 metrics::CallStackProfileParams::GPU_PROCESS)); | 2994 metrics::CallStackProfileParams::GPU_PROCESS)); |
| 2997 } | 2995 } |
| 2998 | 2996 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3239 kWebRtcDevSwitchNames, | 3237 kWebRtcDevSwitchNames, |
| 3240 arraysize(kWebRtcDevSwitchNames)); | 3238 arraysize(kWebRtcDevSwitchNames)); |
| 3241 } | 3239 } |
| 3242 } | 3240 } |
| 3243 #endif // defined(ENABLE_WEBRTC) | 3241 #endif // defined(ENABLE_WEBRTC) |
| 3244 | 3242 |
| 3245 std::unique_ptr<content::MemoryCoordinatorDelegate> | 3243 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 3246 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { | 3244 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { |
| 3247 return memory::ChromeMemoryCoordinatorDelegate::Create(); | 3245 return memory::ChromeMemoryCoordinatorDelegate::Create(); |
| 3248 } | 3246 } |
| 3247 | |
| 3248 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) && defined(ENABLE_MEDIA_ROUTER) | |
|
ncarter (slow)
2016/11/16 22:40:59
Consider having this function's declaration be par
miu
2016/11/16 22:55:03
Done.
| |
| 3249 void ChromeContentBrowserClient::CreateMediaRemoter( | |
| 3250 content::RenderFrameHost* render_frame_host, | |
| 3251 media::mojom::RemotingSourcePtr source, | |
| 3252 media::mojom::RemoterRequest request) { | |
| 3253 CastRemotingConnector::CreateMediaRemoter( | |
| 3254 render_frame_host, std::move(source), std::move(request)); | |
| 3255 } | |
| 3256 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) && defined(ENABLE_MEDIA_ROUTER) | |
| OLD | NEW |