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 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 // WebUSB is an experimental web API. It will only work if the experiment | 2780 // WebUSB is an experimental web API. It will only work if the experiment |
2780 // is enabled and WebUSB feature is enabled. | 2781 // is enabled and WebUSB feature is enabled. |
2781 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2782 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
2782 switches::kEnableExperimentalWebPlatformFeatures) && | 2783 switches::kEnableExperimentalWebPlatformFeatures) && |
2783 base::FeatureList::IsEnabled(features::kWebUsb)) { | 2784 base::FeatureList::IsEnabled(features::kWebUsb)) { |
2784 registry->AddService( | 2785 registry->AddService( |
2785 base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2786 base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2786 registry->AddService( | 2787 registry->AddService( |
2787 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2788 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
2788 } | 2789 } |
| 2790 |
| 2791 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 2792 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoServices(registry); |
| 2793 #endif |
2789 } | 2794 } |
2790 | 2795 |
2791 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( | 2796 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( |
2792 StaticMojoApplicationMap* apps) { | 2797 StaticMojoApplicationMap* apps) { |
2793 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 2798 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
2794 apps->insert(std::make_pair("mojo:media", | 2799 apps->insert(std::make_pair("mojo:media", |
2795 base::Bind(&media::CreateMojoMediaApplication))); | 2800 base::Bind(&media::CreateMojoMediaApplication))); |
2796 #endif | 2801 #endif |
2797 } | 2802 } |
2798 | 2803 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2959 if (channel <= kMaxDisableEncryptionChannel) { | 2964 if (channel <= kMaxDisableEncryptionChannel) { |
2960 static const char* const kWebRtcDevSwitchNames[] = { | 2965 static const char* const kWebRtcDevSwitchNames[] = { |
2961 switches::kDisableWebRtcEncryption, | 2966 switches::kDisableWebRtcEncryption, |
2962 }; | 2967 }; |
2963 to_command_line->CopySwitchesFrom(from_command_line, | 2968 to_command_line->CopySwitchesFrom(from_command_line, |
2964 kWebRtcDevSwitchNames, | 2969 kWebRtcDevSwitchNames, |
2965 arraysize(kWebRtcDevSwitchNames)); | 2970 arraysize(kWebRtcDevSwitchNames)); |
2966 } | 2971 } |
2967 } | 2972 } |
2968 #endif // defined(ENABLE_WEBRTC) | 2973 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |