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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 223 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
224 #include "base/debug/leak_annotations.h" | 224 #include "base/debug/leak_annotations.h" |
225 #include "components/crash/content/app/breakpad_linux.h" | 225 #include "components/crash/content/app/breakpad_linux.h" |
226 #include "components/crash/content/browser/crash_handler_host_linux.h" | 226 #include "components/crash/content/browser/crash_handler_host_linux.h" |
227 #endif | 227 #endif |
228 | 228 |
229 #if BUILDFLAG(ANDROID_JAVA_UI) | 229 #if BUILDFLAG(ANDROID_JAVA_UI) |
230 #include "chrome/browser/android/mojo/chrome_service_registrar_android.h" | 230 #include "chrome/browser/android/mojo/chrome_service_registrar_android.h" |
231 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" | 231 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" |
| 232 #include "chrome/browser/android/service_tab_launcher.h" |
232 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 233 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
233 #include "components/service_tab_launcher/browser/android/service_tab_launcher.h
" | |
234 #endif | 234 #endif |
235 | 235 |
236 #if defined(OS_ANDROID) | 236 #if defined(OS_ANDROID) |
237 #include "ui/base/ui_base_paths.h" | 237 #include "ui/base/ui_base_paths.h" |
238 #include "ui/gfx/android/device_display_info.h" | 238 #include "ui/gfx/android/device_display_info.h" |
239 #endif | 239 #endif |
240 | 240 |
241 #if defined(TOOLKIT_VIEWS) | 241 #if defined(TOOLKIT_VIEWS) |
242 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" | 242 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
243 #endif | 243 #endif |
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 #endif | 2864 #endif |
2865 } | 2865 } |
2866 | 2866 |
2867 void ChromeContentBrowserClient::OpenURL( | 2867 void ChromeContentBrowserClient::OpenURL( |
2868 content::BrowserContext* browser_context, | 2868 content::BrowserContext* browser_context, |
2869 const content::OpenURLParams& params, | 2869 const content::OpenURLParams& params, |
2870 const base::Callback<void(content::WebContents*)>& callback) { | 2870 const base::Callback<void(content::WebContents*)>& callback) { |
2871 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2871 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2872 | 2872 |
2873 #if BUILDFLAG(ANDROID_JAVA_UI) | 2873 #if BUILDFLAG(ANDROID_JAVA_UI) |
2874 service_tab_launcher::ServiceTabLauncher::GetInstance()->LaunchTab( | 2874 ServiceTabLauncher::GetInstance()->LaunchTab(browser_context, params, |
2875 browser_context, params, callback); | 2875 callback); |
2876 #else | 2876 #else |
2877 chrome::NavigateParams nav_params( | 2877 chrome::NavigateParams nav_params( |
2878 Profile::FromBrowserContext(browser_context), | 2878 Profile::FromBrowserContext(browser_context), |
2879 params.url, | 2879 params.url, |
2880 params.transition); | 2880 params.transition); |
2881 FillNavigateParamsFromOpenURLParams(&nav_params, params); | 2881 FillNavigateParamsFromOpenURLParams(&nav_params, params); |
2882 nav_params.user_gesture = params.user_gesture; | 2882 nav_params.user_gesture = params.user_gesture; |
2883 | 2883 |
2884 Navigate(&nav_params); | 2884 Navigate(&nav_params); |
2885 callback.Run(nav_params.target_contents); | 2885 callback.Run(nav_params.target_contents); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 if (channel <= kMaxDisableEncryptionChannel) { | 3043 if (channel <= kMaxDisableEncryptionChannel) { |
3044 static const char* const kWebRtcDevSwitchNames[] = { | 3044 static const char* const kWebRtcDevSwitchNames[] = { |
3045 switches::kDisableWebRtcEncryption, | 3045 switches::kDisableWebRtcEncryption, |
3046 }; | 3046 }; |
3047 to_command_line->CopySwitchesFrom(from_command_line, | 3047 to_command_line->CopySwitchesFrom(from_command_line, |
3048 kWebRtcDevSwitchNames, | 3048 kWebRtcDevSwitchNames, |
3049 arraysize(kWebRtcDevSwitchNames)); | 3049 arraysize(kWebRtcDevSwitchNames)); |
3050 } | 3050 } |
3051 } | 3051 } |
3052 #endif // defined(ENABLE_WEBRTC) | 3052 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |