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

Side by Side Diff: chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm

Issue 1234073002: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 years, 5 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 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h" 5 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h"
6 6
7 #import <SecurityInterface/SFChooseIdentityPanel.h> 7 #import <SecurityInterface/SFChooseIdentityPanel.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void ShowSSLClientCertificateSelector( 75 void ShowSSLClientCertificateSelector(
76 content::WebContents* contents, 76 content::WebContents* contents,
77 net::SSLCertRequestInfo* cert_request_info, 77 net::SSLCertRequestInfo* cert_request_info,
78 scoped_ptr<content::ClientCertificateDelegate> delegate) { 78 scoped_ptr<content::ClientCertificateDelegate> delegate) {
79 DCHECK_CURRENTLY_ON(BrowserThread::UI); 79 DCHECK_CURRENTLY_ON(BrowserThread::UI);
80 80
81 // Not all WebContentses can show modal dialogs. 81 // Not all WebContentses can show modal dialogs.
82 // 82 //
83 // TODO(davidben): Move this hook to the WebContentsDelegate and only try to 83 // TODO(davidben): Move this hook to the WebContentsDelegate and only try to
84 // show a dialog in Browser's implementation. https://crbug.com/456255 84 // show a dialog in Browser's implementation. https://crbug.com/456255
85 if (web_modal::PopupManager::FromWebContents(contents) == nullptr) 85 if (!ConstrainedWindowMac::HasTopLevelDialogManager(contents))
86 return; 86 return;
87 87
88 // The dialog manages its own lifetime. 88 // The dialog manages its own lifetime.
89 SSLClientCertificateSelectorCocoa* selector = 89 SSLClientCertificateSelectorCocoa* selector =
90 [[SSLClientCertificateSelectorCocoa alloc] 90 [[SSLClientCertificateSelectorCocoa alloc]
91 initWithBrowserContext:contents->GetBrowserContext() 91 initWithBrowserContext:contents->GetBrowserContext()
92 certRequestInfo:cert_request_info 92 certRequestInfo:cert_request_info
93 delegate:delegate.Pass()]; 93 delegate:delegate.Pass()];
94 [selector displayForWebContents:contents]; 94 [selector displayForWebContents:contents];
95 } 95 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 257
258 - (void)onConstrainedWindowClosed { 258 - (void)onConstrainedWindowClosed {
259 observer_->StopObserving(); 259 observer_->StopObserving();
260 panel_.reset(); 260 panel_.reset();
261 constrainedWindow_.reset(); 261 constrainedWindow_.reset();
262 [self release]; 262 [self release];
263 } 263 }
264 264
265 @end 265 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698