| 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 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2807 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2807 switches::kEnableExperimentalWebPlatformFeatures) && | 2808 switches::kEnableExperimentalWebPlatformFeatures) && |
| 2808 base::FeatureList::IsEnabled(features::kWebUsb)) { | 2809 base::FeatureList::IsEnabled(features::kWebUsb)) { |
| 2809 registry->AddService( | 2810 registry->AddService( |
| 2810 base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2811 base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
| 2811 #if !defined(OS_ANDROID) | 2812 #if !defined(OS_ANDROID) |
| 2812 registry->AddService( | 2813 registry->AddService( |
| 2813 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2814 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
| 2814 #endif // !defined(OS_ANDROID) | 2815 #endif // !defined(OS_ANDROID) |
| 2815 } | 2816 } |
| 2817 |
| 2818 // Register mojo CredentialManager service only for main frame. |
| 2819 if (!render_frame_host->GetParent()) { |
| 2820 registry->AddService( |
| 2821 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, |
| 2822 render_frame_host)); |
| 2823 } |
| 2816 } | 2824 } |
| 2817 | 2825 |
| 2818 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2826 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
| 2819 StaticMojoApplicationMap* apps) { | 2827 StaticMojoApplicationMap* apps) { |
| 2820 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2828 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 2821 apps->insert(std::make_pair("mojo:media", | 2829 apps->insert(std::make_pair("mojo:media", |
| 2822 base::Bind(&media::CreateMojoMediaApplication))); | 2830 base::Bind(&media::CreateMojoMediaApplication))); |
| 2823 #endif | 2831 #endif |
| 2824 } | 2832 } |
| 2825 | 2833 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2986 if (channel <= kMaxDisableEncryptionChannel) { | 2994 if (channel <= kMaxDisableEncryptionChannel) { |
| 2987 static const char* const kWebRtcDevSwitchNames[] = { | 2995 static const char* const kWebRtcDevSwitchNames[] = { |
| 2988 switches::kDisableWebRtcEncryption, | 2996 switches::kDisableWebRtcEncryption, |
| 2989 }; | 2997 }; |
| 2990 to_command_line->CopySwitchesFrom(from_command_line, | 2998 to_command_line->CopySwitchesFrom(from_command_line, |
| 2991 kWebRtcDevSwitchNames, | 2999 kWebRtcDevSwitchNames, |
| 2992 arraysize(kWebRtcDevSwitchNames)); | 3000 arraysize(kWebRtcDevSwitchNames)); |
| 2993 } | 3001 } |
| 2994 } | 3002 } |
| 2995 #endif // defined(ENABLE_WEBRTC) | 3003 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |