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 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2798 } | 2799 } |
2799 | 2800 |
2800 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( | 2801 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices( |
2801 content::ServiceRegistry* registry, | 2802 content::ServiceRegistry* registry, |
2802 content::RenderFrameHost* render_frame_host) { | 2803 content::RenderFrameHost* render_frame_host) { |
2803 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2804 registry->AddService(base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2804 #if !defined(OS_ANDROID) | 2805 #if !defined(OS_ANDROID) |
2805 registry->AddService( | 2806 registry->AddService( |
2806 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2807 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
2807 #endif // !defined(OS_ANDROID) | 2808 #endif // !defined(OS_ANDROID) |
| 2809 |
| 2810 // Register mojo CredentialManager service only for main frame. |
| 2811 if (!render_frame_host->GetParent()) { |
| 2812 registry->AddService( |
| 2813 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, |
| 2814 render_frame_host)); |
| 2815 } |
2808 } | 2816 } |
2809 | 2817 |
2810 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2818 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
2811 StaticMojoApplicationMap* apps) { | 2819 StaticMojoApplicationMap* apps) { |
2812 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2820 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
2813 apps->insert(std::make_pair("mojo:media", | 2821 apps->insert(std::make_pair("mojo:media", |
2814 base::Bind(&media::CreateMojoMediaApplication))); | 2822 base::Bind(&media::CreateMojoMediaApplication))); |
2815 #endif | 2823 #endif |
2816 } | 2824 } |
2817 | 2825 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2979 if (channel <= kMaxDisableEncryptionChannel) { | 2987 if (channel <= kMaxDisableEncryptionChannel) { |
2980 static const char* const kWebRtcDevSwitchNames[] = { | 2988 static const char* const kWebRtcDevSwitchNames[] = { |
2981 switches::kDisableWebRtcEncryption, | 2989 switches::kDisableWebRtcEncryption, |
2982 }; | 2990 }; |
2983 to_command_line->CopySwitchesFrom(from_command_line, | 2991 to_command_line->CopySwitchesFrom(from_command_line, |
2984 kWebRtcDevSwitchNames, | 2992 kWebRtcDevSwitchNames, |
2985 arraysize(kWebRtcDevSwitchNames)); | 2993 arraysize(kWebRtcDevSwitchNames)); |
2986 } | 2994 } |
2987 } | 2995 } |
2988 #endif // defined(ENABLE_WEBRTC) | 2996 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |