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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 #include "chrome/browser/chrome_browser_main_posix.h" | 209 #include "chrome/browser/chrome_browser_main_posix.h" |
210 #endif | 210 #endif |
211 | 211 |
212 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 212 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
213 #include "base/debug/leak_annotations.h" | 213 #include "base/debug/leak_annotations.h" |
214 #include "components/crash/content/app/breakpad_linux.h" | 214 #include "components/crash/content/app/breakpad_linux.h" |
215 #include "components/crash/content/browser/crash_handler_host_linux.h" | 215 #include "components/crash/content/browser/crash_handler_host_linux.h" |
216 #endif | 216 #endif |
217 | 217 |
218 #if BUILDFLAG(ANDROID_JAVA_UI) | 218 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 219 #include "chrome/browser/android/mojo/chrome_service_registrar_android.h" |
219 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" | 220 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" |
220 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 221 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
221 #include "components/service_tab_launcher/browser/android/service_tab_launcher.h
" | 222 #include "components/service_tab_launcher/browser/android/service_tab_launcher.h
" |
222 #endif | 223 #endif |
223 | 224 |
224 #if defined(OS_ANDROID) | 225 #if defined(OS_ANDROID) |
225 #include "ui/base/ui_base_paths.h" | 226 #include "ui/base/ui_base_paths.h" |
226 #include "ui/gfx/android/device_display_info.h" | 227 #include "ui/gfx/android/device_display_info.h" |
227 #endif | 228 #endif |
228 | 229 |
(...skipping 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 // WebUSB is an experimental web API. It will only work if the experiment | 2796 // WebUSB is an experimental web API. It will only work if the experiment |
2796 // is enabled and WebUSB feature is enabled. | 2797 // is enabled and WebUSB feature is enabled. |
2797 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2798 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
2798 switches::kEnableExperimentalWebPlatformFeatures) && | 2799 switches::kEnableExperimentalWebPlatformFeatures) && |
2799 base::FeatureList::IsEnabled(features::kWebUsb)) { | 2800 base::FeatureList::IsEnabled(features::kWebUsb)) { |
2800 registry->AddService( | 2801 registry->AddService( |
2801 base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2802 base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2802 registry->AddService( | 2803 registry->AddService( |
2803 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2804 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
2804 } | 2805 } |
| 2806 |
| 2807 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 2808 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoServices(registry); |
| 2809 #endif |
2805 } | 2810 } |
2806 | 2811 |
2807 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2812 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
2808 StaticMojoApplicationMap* apps) { | 2813 StaticMojoApplicationMap* apps) { |
2809 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2814 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
2810 apps->insert(std::make_pair("mojo:media", | 2815 apps->insert(std::make_pair("mojo:media", |
2811 base::Bind(&media::CreateMojoMediaApplication))); | 2816 base::Bind(&media::CreateMojoMediaApplication))); |
2812 #endif | 2817 #endif |
2813 } | 2818 } |
2814 | 2819 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2975 if (channel <= kMaxDisableEncryptionChannel) { | 2980 if (channel <= kMaxDisableEncryptionChannel) { |
2976 static const char* const kWebRtcDevSwitchNames[] = { | 2981 static const char* const kWebRtcDevSwitchNames[] = { |
2977 switches::kDisableWebRtcEncryption, | 2982 switches::kDisableWebRtcEncryption, |
2978 }; | 2983 }; |
2979 to_command_line->CopySwitchesFrom(from_command_line, | 2984 to_command_line->CopySwitchesFrom(from_command_line, |
2980 kWebRtcDevSwitchNames, | 2985 kWebRtcDevSwitchNames, |
2981 arraysize(kWebRtcDevSwitchNames)); | 2986 arraysize(kWebRtcDevSwitchNames)); |
2982 } | 2987 } |
2983 } | 2988 } |
2984 #endif // defined(ENABLE_WEBRTC) | 2989 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |