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

Side by Side Diff: chrome/browser/ui/views/ssl_client_certificate_selector.cc

Issue 1234073002: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comments. 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
« no previous file with comments | « chrome/browser/ui/views/certificate_selector.cc ('k') | no next file » | 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/ui/views/ssl_client_certificate_selector.h" 5 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void ShowSSLClientCertificateSelector( 98 void ShowSSLClientCertificateSelector(
99 content::WebContents* contents, 99 content::WebContents* contents,
100 net::SSLCertRequestInfo* cert_request_info, 100 net::SSLCertRequestInfo* cert_request_info,
101 scoped_ptr<content::ClientCertificateDelegate> delegate) { 101 scoped_ptr<content::ClientCertificateDelegate> delegate) {
102 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 102 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
103 103
104 // Not all WebContentses can show modal dialogs. 104 // Not all WebContentses can show modal dialogs.
105 // 105 //
106 // TODO(davidben): Move this hook to the WebContentsDelegate and only try to 106 // TODO(davidben): Move this hook to the WebContentsDelegate and only try to
107 // show a dialog in Browser's implementation. https://crbug.com/456255 107 // show a dialog in Browser's implementation. https://crbug.com/456255
108 if (web_modal::PopupManager::FromWebContents(contents) == nullptr) 108 if (!SSLClientCertificateSelector::CanShow(contents))
109 return; 109 return;
110 110
111 SSLClientCertificateSelector* selector = new SSLClientCertificateSelector( 111 SSLClientCertificateSelector* selector = new SSLClientCertificateSelector(
112 contents, cert_request_info, delegate.Pass()); 112 contents, cert_request_info, delegate.Pass());
113 selector->Init(); 113 selector->Init();
114 selector->Show(); 114 selector->Show();
115 } 115 }
116 116
117 } // namespace chrome 117 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/certificate_selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698