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" | |
57 #include "chrome/browser/permissions/permission_context_base.h" | 56 #include "chrome/browser/permissions/permission_context_base.h" |
58 #include "chrome/browser/platform_util.h" | 57 #include "chrome/browser/platform_util.h" |
59 #include "chrome/browser/prerender/prerender_final_status.h" | 58 #include "chrome/browser/prerender/prerender_final_status.h" |
60 #include "chrome/browser/prerender/prerender_manager.h" | 59 #include "chrome/browser/prerender/prerender_manager.h" |
61 #include "chrome/browser/prerender/prerender_manager_factory.h" | 60 #include "chrome/browser/prerender/prerender_manager_factory.h" |
62 #include "chrome/browser/prerender/prerender_message_filter.h" | 61 #include "chrome/browser/prerender/prerender_message_filter.h" |
63 #include "chrome/browser/printing/printing_message_filter.h" | 62 #include "chrome/browser/printing/printing_message_filter.h" |
64 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 63 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
65 #include "chrome/browser/profiles/profile.h" | 64 #include "chrome/browser/profiles/profile.h" |
66 #include "chrome/browser/profiles/profile_io_data.h" | 65 #include "chrome/browser/profiles/profile_io_data.h" |
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2796 // WebUSB is an experimental web API. It will only work if the experiment | 2795 // WebUSB is an experimental web API. It will only work if the experiment |
2797 // is enabled and WebUSB feature is enabled. | 2796 // is enabled and WebUSB feature is enabled. |
2798 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2797 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
2799 switches::kEnableExperimentalWebPlatformFeatures) && | 2798 switches::kEnableExperimentalWebPlatformFeatures) && |
2800 base::FeatureList::IsEnabled(features::kWebUsb)) { | 2799 base::FeatureList::IsEnabled(features::kWebUsb)) { |
2801 registry->AddService( | 2800 registry->AddService( |
2802 base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2801 base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2803 registry->AddService( | 2802 registry->AddService( |
2804 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2803 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
2805 } | 2804 } |
2806 | |
2807 // Register mojo CredentialManager service only for main frame. | |
2808 if (!render_frame_host->GetParent()) { | |
2809 registry->AddService( | |
2810 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, | |
2811 render_frame_host)); | |
2812 } | |
2813 } | 2805 } |
2814 | 2806 |
2815 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2807 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
2816 StaticMojoApplicationMap* apps) { | 2808 StaticMojoApplicationMap* apps) { |
2817 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2809 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
2818 apps->insert(std::make_pair("mojo:media", | 2810 apps->insert(std::make_pair("mojo:media", |
2819 base::Bind(&media::CreateMojoMediaApplication))); | 2811 base::Bind(&media::CreateMojoMediaApplication))); |
2820 #endif | 2812 #endif |
2821 } | 2813 } |
2822 | 2814 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2983 if (channel <= kMaxDisableEncryptionChannel) { | 2975 if (channel <= kMaxDisableEncryptionChannel) { |
2984 static const char* const kWebRtcDevSwitchNames[] = { | 2976 static const char* const kWebRtcDevSwitchNames[] = { |
2985 switches::kDisableWebRtcEncryption, | 2977 switches::kDisableWebRtcEncryption, |
2986 }; | 2978 }; |
2987 to_command_line->CopySwitchesFrom(from_command_line, | 2979 to_command_line->CopySwitchesFrom(from_command_line, |
2988 kWebRtcDevSwitchNames, | 2980 kWebRtcDevSwitchNames, |
2989 arraysize(kWebRtcDevSwitchNames)); | 2981 arraysize(kWebRtcDevSwitchNames)); |
2990 } | 2982 } |
2991 } | 2983 } |
2992 #endif // defined(ENABLE_WEBRTC) | 2984 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |