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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "chrome/browser/download/download_prefs.h" | 46 #include "chrome/browser/download/download_prefs.h" |
47 #include "chrome/browser/engagement/site_engagement_eviction_policy.h" | 47 #include "chrome/browser/engagement/site_engagement_eviction_policy.h" |
48 #include "chrome/browser/font_family_cache.h" | 48 #include "chrome/browser/font_family_cache.h" |
49 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 49 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
50 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 50 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
53 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 53 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
54 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 54 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
55 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 55 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 56 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
56 #include "chrome/browser/platform_util.h" | 57 #include "chrome/browser/platform_util.h" |
57 #include "chrome/browser/prerender/prerender_final_status.h" | 58 #include "chrome/browser/prerender/prerender_final_status.h" |
58 #include "chrome/browser/prerender/prerender_manager.h" | 59 #include "chrome/browser/prerender/prerender_manager.h" |
59 #include "chrome/browser/prerender/prerender_manager_factory.h" | 60 #include "chrome/browser/prerender/prerender_manager_factory.h" |
60 #include "chrome/browser/prerender/prerender_message_filter.h" | 61 #include "chrome/browser/prerender/prerender_message_filter.h" |
61 #include "chrome/browser/printing/printing_message_filter.h" | 62 #include "chrome/browser/printing/printing_message_filter.h" |
62 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 63 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
63 #include "chrome/browser/profiles/profile.h" | 64 #include "chrome/browser/profiles/profile.h" |
64 #include "chrome/browser/profiles/profile_io_data.h" | 65 #include "chrome/browser/profiles/profile_io_data.h" |
65 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 66 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 } | 2788 } |
2788 | 2789 |
2789 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( | 2790 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( |
2790 content::ServiceRegistry* registry, | 2791 content::ServiceRegistry* registry, |
2791 content::RenderFrameHost* render_frame_host) { | 2792 content::RenderFrameHost* render_frame_host) { |
2792 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2793 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2793 #if !defined(OS_ANDROID) | 2794 #if !defined(OS_ANDROID) |
2794 registry->AddService( | 2795 registry->AddService( |
2795 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); | 2796 base::Bind(&CreateWebUsbPermissionBubble, render_frame_host)); |
2796 #endif // !defined(OS_ANDROID) | 2797 #endif // !defined(OS_ANDROID) |
| 2798 |
| 2799 // Register mojo CredentialManager service only for main frame. |
| 2800 if (!render_frame_host->GetParent()) { |
| 2801 registry->AddService( |
| 2802 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, |
| 2803 render_frame_host)); |
| 2804 } |
2797 } | 2805 } |
2798 | 2806 |
2799 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2807 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
2800 StaticMojoApplicationMap* apps) { | 2808 StaticMojoApplicationMap* apps) { |
2801 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2809 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
2802 apps->insert(std::make_pair(GURL("mojo:media"), | 2810 apps->insert(std::make_pair(GURL("mojo:media"), |
2803 base::Bind(&media::CreateMojoMediaApplication))); | 2811 base::Bind(&media::CreateMojoMediaApplication))); |
2804 #endif | 2812 #endif |
2805 } | 2813 } |
2806 | 2814 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 if (channel <= kMaxDisableEncryptionChannel) { | 2976 if (channel <= kMaxDisableEncryptionChannel) { |
2969 static const char* const kWebRtcDevSwitchNames[] = { | 2977 static const char* const kWebRtcDevSwitchNames[] = { |
2970 switches::kDisableWebRtcEncryption, | 2978 switches::kDisableWebRtcEncryption, |
2971 }; | 2979 }; |
2972 to_command_line->CopySwitchesFrom(from_command_line, | 2980 to_command_line->CopySwitchesFrom(from_command_line, |
2973 kWebRtcDevSwitchNames, | 2981 kWebRtcDevSwitchNames, |
2974 arraysize(kWebRtcDevSwitchNames)); | 2982 arraysize(kWebRtcDevSwitchNames)); |
2975 } | 2983 } |
2976 } | 2984 } |
2977 #endif // defined(ENABLE_WEBRTC) | 2985 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |