Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2194523002: [arc-intents] Handle redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync/rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_navigation_throttle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" 198 #include "chrome/browser/chromeos/fileapi/file_system_backend.h"
199 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" 199 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h"
200 #include "chrome/browser/chromeos/login/signin/merge_session_navigation_throttle .h" 200 #include "chrome/browser/chromeos/login/signin/merge_session_navigation_throttle .h"
201 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h" 201 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h"
202 #include "chrome/browser/chromeos/login/startup_utils.h" 202 #include "chrome/browser/chromeos/login/startup_utils.h"
203 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 203 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
204 #include "chrome/browser/chromeos/system/input_device_settings.h" 204 #include "chrome/browser/chromeos/system/input_device_settings.h"
205 #include "chrome/browser/ui/ash/ash_util.h" 205 #include "chrome/browser/ui/ash/ash_util.h"
206 #include "chrome/browser/ui/browser_dialogs.h" 206 #include "chrome/browser/ui/browser_dialogs.h"
207 #include "chromeos/chromeos_switches.h" 207 #include "chromeos/chromeos_switches.h"
208 #include "components/arc/arc_service_manager.h"
209 #include "components/arc/intent_helper/local_activity_resolver.h"
210 #include "components/user_manager/user_manager.h" 208 #include "components/user_manager/user_manager.h"
211 #elif defined(OS_LINUX) 209 #elif defined(OS_LINUX)
212 #include "chrome/browser/chrome_browser_main_linux.h" 210 #include "chrome/browser/chrome_browser_main_linux.h"
213 #elif defined(OS_ANDROID) 211 #elif defined(OS_ANDROID)
214 #include "chrome/browser/chrome_browser_main_android.h" 212 #include "chrome/browser/chrome_browser_main_android.h"
215 #include "chrome/common/descriptors_android.h" 213 #include "chrome/common/descriptors_android.h"
216 #include "components/crash/content/browser/crash_dump_manager_android.h" 214 #include "components/crash/content/browser/crash_dump_manager_android.h"
217 #include "components/navigation_interception/intercept_navigation_delegate.h" 215 #include "components/navigation_interception/intercept_navigation_delegate.h"
218 #include "ui/base/resource/resource_bundle_android.h" 216 #include "ui/base/resource/resource_bundle_android.h"
219 #elif defined(OS_POSIX) 217 #elif defined(OS_POSIX)
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2941 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && 2939 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() &&
2942 !merge_session_throttling_utils::AreAllSessionMergedAlready() && 2940 !merge_session_throttling_utils::AreAllSessionMergedAlready() &&
2943 handle->GetURL().SchemeIsHTTPOrHTTPS()) { 2941 handle->GetURL().SchemeIsHTTPOrHTTPS()) {
2944 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); 2942 throttles.push_back(MergeSessionNavigationThrottle::Create(handle));
2945 } 2943 }
2946 2944
2947 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a 2945 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a
2948 // warning that the selected app is not in incognito mode. 2946 // warning that the selected app is not in incognito mode.
2949 if (IsIntentPickerEnabled() && 2947 if (IsIntentPickerEnabled() &&
2950 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { 2948 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) {
2951 arc::ArcServiceManager* arc_service_manager = 2949 prerender::PrerenderContents* prerender_contents =
2952 arc::ArcServiceManager::Get(); 2950 prerender::PrerenderContents::FromWebContents(
2953 DCHECK(arc_service_manager); 2951 handle->GetWebContents());
2954 scoped_refptr<arc::LocalActivityResolver> local_resolver = 2952 if (!prerender_contents) {
2955 arc_service_manager->activity_resolver(); 2953 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
2956 if (!local_resolver->ShouldChromeHandleUrl(handle->GetURL())) { 2954 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>(
2957 prerender::PrerenderContents* prerender_contents = 2955 handle, intent_picker_cb);
2958 prerender::PrerenderContents::FromWebContents( 2956 throttles.push_back(std::move(url_to_arc_throttle));
2959 handle->GetWebContents());
2960 if (!prerender_contents) {
2961 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
2962 auto url_to_arc_throttle =
2963 base::MakeUnique<arc::ArcNavigationThrottle>(handle,
2964 intent_picker_cb);
2965 throttles.push_back(std::move(url_to_arc_throttle));
2966 }
2967 } 2957 }
2968 } 2958 }
2969 } 2959 }
2970 #endif 2960 #endif
2971 2961
2972 #if defined(ENABLE_EXTENSIONS) 2962 #if defined(ENABLE_EXTENSIONS)
2973 if (!handle->IsInMainFrame()) 2963 if (!handle->IsInMainFrame())
2974 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); 2964 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
2975 #endif 2965 #endif
2976 2966
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 if (channel <= kMaxDisableEncryptionChannel) { 3048 if (channel <= kMaxDisableEncryptionChannel) {
3059 static const char* const kWebRtcDevSwitchNames[] = { 3049 static const char* const kWebRtcDevSwitchNames[] = {
3060 switches::kDisableWebRtcEncryption, 3050 switches::kDisableWebRtcEncryption,
3061 }; 3051 };
3062 to_command_line->CopySwitchesFrom(from_command_line, 3052 to_command_line->CopySwitchesFrom(from_command_line,
3063 kWebRtcDevSwitchNames, 3053 kWebRtcDevSwitchNames,
3064 arraysize(kWebRtcDevSwitchNames)); 3054 arraysize(kWebRtcDevSwitchNames));
3065 } 3055 }
3066 } 3056 }
3067 #endif // defined(ENABLE_WEBRTC) 3057 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698