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

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

Issue 11647017: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stage changes to preserve history Created 8 years 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 | Annotate | Revision Log
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 cert = certificates_[index]; 113 cert = certificates_[index];
114 else 114 else
115 NOTREACHED(); 115 NOTREACHED();
116 } 116 }
117 117
118 // Finally, tell the backend which identity (or none) the user selected. 118 // Finally, tell the backend which identity (or none) the user selected.
119 observer_->StopObserving(); 119 observer_->StopObserving();
120 observer_->CertificateSelected(cert); 120 observer_->CertificateSelected(cert);
121 121
122 if (!closePending_) 122 if (!closePending_)
123 constrainedWindow_->CloseConstrainedWindow(); 123 constrainedWindow_->CloseWebContentsModalDialog();
124 } 124 }
125 125
126 - (void)displayForWebContents:(content::WebContents*)webContents { 126 - (void)displayForWebContents:(content::WebContents*)webContents {
127 // Create an array of CFIdentityRefs for the certificates: 127 // Create an array of CFIdentityRefs for the certificates:
128 size_t numCerts = observer_->cert_request_info()->client_certs.size(); 128 size_t numCerts = observer_->cert_request_info()->client_certs.size();
129 identities_.reset(CFArrayCreateMutable( 129 identities_.reset(CFArrayCreateMutable(
130 kCFAllocatorDefault, numCerts, &kCFTypeArrayCallBacks)); 130 kCFAllocatorDefault, numCerts, &kCFTypeArrayCallBacks));
131 for (size_t i = 0; i < numCerts; ++i) { 131 for (size_t i = 0; i < numCerts; ++i) {
132 SecCertificateRef cert = 132 SecCertificateRef cert =
133 observer_->cert_request_info()->client_certs[i]->os_cert_handle(); 133 observer_->cert_request_info()->client_certs[i]->os_cert_handle();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // NOOP 203 // NOOP
204 } 204 }
205 205
206 - (void)onConstrainedWindowClosed { 206 - (void)onConstrainedWindowClosed {
207 panel_.reset(); 207 panel_.reset();
208 constrainedWindow_.reset(); 208 constrainedWindow_.reset();
209 [self release]; 209 [self release];
210 } 210 }
211 211
212 @end 212 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698