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 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( | 2659 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( |
2656 content::ServiceRegistry* registry, | 2660 content::ServiceRegistry* registry, |
2657 content::RenderFrameHost* render_frame_host) { | 2661 content::RenderFrameHost* render_frame_host) { |
2658 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2662 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2659 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 2663 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
2660 registry->AddService( | 2664 registry->AddService( |
2661 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); | 2665 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); |
2662 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 2666 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
2663 } | 2667 } |
2664 | 2668 |
| 2669 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
| 2670 StaticMojoApplicationMap* apps) { |
| 2671 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 2672 apps->insert(std::make_pair( |
| 2673 GURL("mojo:media"), base::Bind(&media::MojoMediaApplication::CreateApp))); |
| 2674 #endif |
| 2675 } |
| 2676 |
2665 void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications( | 2677 void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications( |
2666 OutOfProcessMojoApplicationMap* apps) { | 2678 OutOfProcessMojoApplicationMap* apps) { |
2667 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 2679 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
2668 apps->insert(std::make_pair(GURL("mojo:media"), | 2680 apps->insert(std::make_pair(GURL("mojo:media"), |
2669 base::ASCIIToUTF16("Media App"))); | 2681 base::ASCIIToUTF16("Media App"))); |
2670 #endif | 2682 #endif |
2671 } | 2683 } |
2672 | 2684 |
2673 void ChromeContentBrowserClient::OpenURL( | 2685 void ChromeContentBrowserClient::OpenURL( |
2674 content::BrowserContext* browser_context, | 2686 content::BrowserContext* browser_context, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2828 if (channel <= kMaxDisableEncryptionChannel) { | 2840 if (channel <= kMaxDisableEncryptionChannel) { |
2829 static const char* const kWebRtcDevSwitchNames[] = { | 2841 static const char* const kWebRtcDevSwitchNames[] = { |
2830 switches::kDisableWebRtcEncryption, | 2842 switches::kDisableWebRtcEncryption, |
2831 }; | 2843 }; |
2832 to_command_line->CopySwitchesFrom(from_command_line, | 2844 to_command_line->CopySwitchesFrom(from_command_line, |
2833 kWebRtcDevSwitchNames, | 2845 kWebRtcDevSwitchNames, |
2834 arraysize(kWebRtcDevSwitchNames)); | 2846 arraysize(kWebRtcDevSwitchNames)); |
2835 } | 2847 } |
2836 } | 2848 } |
2837 #endif // defined(ENABLE_WEBRTC) | 2849 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |