OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ssl_client_certificate_selector.h" |
6 | 6 |
7 #import <SecurityInterface/SFChooseIdentityPanel.h> | 7 #import <SecurityInterface/SFChooseIdentityPanel.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 - (void)displayDialog:(TabContents*)parent; | 92 - (void)displayDialog:(TabContents*)parent; |
93 @end | 93 @end |
94 | 94 |
95 namespace browser { | 95 namespace browser { |
96 | 96 |
97 void ShowSSLClientCertificateSelector( | 97 void ShowSSLClientCertificateSelector( |
98 TabContents* parent, | 98 TabContents* parent, |
99 net::SSLCertRequestInfo* cert_request_info, | 99 net::SSLCertRequestInfo* cert_request_info, |
100 SSLClientAuthHandler* delegate) { | 100 SSLClientAuthHandler* delegate) { |
101 // TODO(davidben): Implement a tab-modal dialog. | 101 // TODO(davidben): Implement a tab-modal dialog. |
102 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); | 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
103 SSLClientCertificateSelectorCocoa* selector = | 103 SSLClientCertificateSelectorCocoa* selector = |
104 [[[SSLClientCertificateSelectorCocoa alloc] | 104 [[[SSLClientCertificateSelectorCocoa alloc] |
105 initWithHandler:delegate | 105 initWithHandler:delegate |
106 certRequestInfo:cert_request_info] autorelease]; | 106 certRequestInfo:cert_request_info] autorelease]; |
107 [selector displayDialog:parent]; | 107 [selector displayDialog:parent]; |
108 } | 108 } |
109 | 109 |
110 } // namespace browser | 110 } // namespace browser |
111 | 111 |
112 @implementation SSLClientCertificateSelectorCocoa | 112 @implementation SSLClientCertificateSelectorCocoa |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 parent->CreateConstrainedDialog(new ConstrainedSFChooseIdentityPanel( | 187 parent->CreateConstrainedDialog(new ConstrainedSFChooseIdentityPanel( |
188 panel, self, | 188 panel, self, |
189 @selector(sheetDidEnd:returnCode:context:), | 189 @selector(sheetDidEnd:returnCode:context:), |
190 identities_, title)); | 190 identities_, title)); |
191 // Note: SFChooseIdentityPanel does not take a reference to itself while the | 191 // Note: SFChooseIdentityPanel does not take a reference to itself while the |
192 // sheet is open. Don't release the ownership claim until the sheet has ended | 192 // sheet is open. Don't release the ownership claim until the sheet has ended |
193 // in |-sheetDidEnd:returnCode:context:|. | 193 // in |-sheetDidEnd:returnCode:context:|. |
194 } | 194 } |
195 | 195 |
196 @end | 196 @end |
OLD | NEW |