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

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

Issue 2229943003: Reusing Ok/Cancel buttons for intent picker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Getting rid of GetDefaultDialogButton() Created 4 years, 2 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
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 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3124 if (handle->IsInMainFrame()) { 3124 if (handle->IsInMainFrame()) {
3125 // Add interstitial page while merge session process (cookie reconstruction 3125 // Add interstitial page while merge session process (cookie reconstruction
3126 // from OAuth2 refresh token in ChromeOS login) is still in progress while 3126 // from OAuth2 refresh token in ChromeOS login) is still in progress while
3127 // we are attempting to load a google property. 3127 // we are attempting to load a google property.
3128 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && 3128 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() &&
3129 !merge_session_throttling_utils::AreAllSessionMergedAlready() && 3129 !merge_session_throttling_utils::AreAllSessionMergedAlready() &&
3130 handle->GetURL().SchemeIsHTTPOrHTTPS()) { 3130 handle->GetURL().SchemeIsHTTPOrHTTPS()) {
3131 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); 3131 throttles.push_back(MergeSessionNavigationThrottle::Create(handle));
3132 } 3132 }
3133 3133
3134 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a
3135 // warning that the selected app is not in incognito mode.
3136 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); 3134 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
3137 if (auth_service && auth_service->IsArcEnabled() && 3135 if (auth_service && auth_service->IsArcEnabled() &&
3138 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { 3136 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) {
3139 prerender::PrerenderContents* prerender_contents = 3137 prerender::PrerenderContents* prerender_contents =
3140 prerender::PrerenderContents::FromWebContents( 3138 prerender::PrerenderContents::FromWebContents(
3141 handle->GetWebContents()); 3139 handle->GetWebContents());
3142 if (!prerender_contents) { 3140 if (!prerender_contents) {
3143 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); 3141 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
3144 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( 3142 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>(
3145 handle, intent_picker_cb); 3143 handle, intent_picker_cb);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 if (channel <= kMaxDisableEncryptionChannel) { 3245 if (channel <= kMaxDisableEncryptionChannel) {
3248 static const char* const kWebRtcDevSwitchNames[] = { 3246 static const char* const kWebRtcDevSwitchNames[] = {
3249 switches::kDisableWebRtcEncryption, 3247 switches::kDisableWebRtcEncryption,
3250 }; 3248 };
3251 to_command_line->CopySwitchesFrom(from_command_line, 3249 to_command_line->CopySwitchesFrom(from_command_line,
3252 kWebRtcDevSwitchNames, 3250 kWebRtcDevSwitchNames,
3253 arraysize(kWebRtcDevSwitchNames)); 3251 arraysize(kWebRtcDevSwitchNames));
3254 } 3252 }
3255 } 3253 }
3256 #endif // defined(ENABLE_WEBRTC) 3254 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698