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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 #endif | 287 #endif |
288 | 288 |
289 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 289 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
290 #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h" | 290 #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h" |
291 #endif | 291 #endif |
292 | 292 |
293 #if defined(ENABLE_WAYLAND_SERVER) | 293 #if defined(ENABLE_WAYLAND_SERVER) |
294 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 294 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
295 #endif | 295 #endif |
296 | 296 |
| 297 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 298 #include "media/mojo/services/mojo_media_application.h" |
| 299 #endif |
| 300 |
297 using base::FileDescriptor; | 301 using base::FileDescriptor; |
298 using blink::WebWindowFeatures; | 302 using blink::WebWindowFeatures; |
299 using content::AccessTokenStore; | 303 using content::AccessTokenStore; |
300 using content::BrowserThread; | 304 using content::BrowserThread; |
301 using content::BrowserURLHandler; | 305 using content::BrowserURLHandler; |
302 using content::ChildProcessSecurityPolicy; | 306 using content::ChildProcessSecurityPolicy; |
303 using content::QuotaPermissionContext; | 307 using content::QuotaPermissionContext; |
304 using content::RenderFrameHost; | 308 using content::RenderFrameHost; |
305 using content::RenderViewHost; | 309 using content::RenderViewHost; |
306 using content::ResourceType; | 310 using content::ResourceType; |
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2649 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( | 2653 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( |
2650 content::ServiceRegistry* registry, | 2654 content::ServiceRegistry* registry, |
2651 content::RenderFrameHost* render_frame_host) { | 2655 content::RenderFrameHost* render_frame_host) { |
2652 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2656 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2653 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 2657 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
2654 registry->AddService( | 2658 registry->AddService( |
2655 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); | 2659 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); |
2656 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 2660 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
2657 } | 2661 } |
2658 | 2662 |
| 2663 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
| 2664 StaticMojoApplicationMap* apps) { |
| 2665 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 2666 apps->insert(std::make_pair( |
| 2667 GURL("mojo:media"), base::Bind(&media::MojoMediaApplication::CreateApp))); |
| 2668 #endif |
| 2669 } |
| 2670 |
2659 void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications( | 2671 void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications( |
2660 OutOfProcessMojoApplicationMap* apps) { | 2672 OutOfProcessMojoApplicationMap* apps) { |
2661 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 2673 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
2662 apps->insert(std::make_pair(GURL("mojo:media"), | 2674 apps->insert(std::make_pair(GURL("mojo:media"), |
2663 base::ASCIIToUTF16("Media App"))); | 2675 base::ASCIIToUTF16("Media App"))); |
2664 #endif | 2676 #endif |
2665 } | 2677 } |
2666 | 2678 |
2667 void ChromeContentBrowserClient::OpenURL( | 2679 void ChromeContentBrowserClient::OpenURL( |
2668 content::BrowserContext* browser_context, | 2680 content::BrowserContext* browser_context, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2822 if (channel <= kMaxDisableEncryptionChannel) { | 2834 if (channel <= kMaxDisableEncryptionChannel) { |
2823 static const char* const kWebRtcDevSwitchNames[] = { | 2835 static const char* const kWebRtcDevSwitchNames[] = { |
2824 switches::kDisableWebRtcEncryption, | 2836 switches::kDisableWebRtcEncryption, |
2825 }; | 2837 }; |
2826 to_command_line->CopySwitchesFrom(from_command_line, | 2838 to_command_line->CopySwitchesFrom(from_command_line, |
2827 kWebRtcDevSwitchNames, | 2839 kWebRtcDevSwitchNames, |
2828 arraysize(kWebRtcDevSwitchNames)); | 2840 arraysize(kWebRtcDevSwitchNames)); |
2829 } | 2841 } |
2830 } | 2842 } |
2831 #endif // defined(ENABLE_WEBRTC) | 2843 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |