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

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

Issue 1430023002: Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per erikchen@'s comments. Created 5 years, 1 month 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 [panel_ setInformativeText:message]; 169 [panel_ setInformativeText:message];
170 [panel_ setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)]; 170 [panel_ setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)];
171 [panel_ setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)]; 171 [panel_ setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)];
172 SecPolicyRef sslPolicy; 172 SecPolicyRef sslPolicy;
173 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) { 173 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) {
174 [panel_ setPolicies:(id)sslPolicy]; 174 [panel_ setPolicies:(id)sslPolicy];
175 CFRelease(sslPolicy); 175 CFRelease(sslPolicy);
176 } 176 }
177 177
178 constrainedWindow_.reset( 178 constrainedWindow_.reset(
179 new ConstrainedWindowMac(observer_.get(), webContents, self)); 179 CreateAndShowWebModalDialogMac(observer_.get(), webContents, self));
180 observer_->StartObserving(); 180 observer_->StartObserving();
181 } 181 }
182 182
183 - (void)closeWebContentsModalDialog { 183 - (void)closeWebContentsModalDialog {
184 DCHECK(constrainedWindow_); 184 DCHECK(constrainedWindow_);
185 constrainedWindow_->CloseWebContentsModalDialog(); 185 constrainedWindow_->CloseWebContentsModalDialog();
186 } 186 }
187 187
188 - (NSWindow*)overlayWindow { 188 - (NSWindow*)overlayWindow {
189 return overlayWindow_; 189 return overlayWindow_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 - (void)makeSheetKeyAndOrderFront { 251 - (void)makeSheetKeyAndOrderFront {
252 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil]; 252 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil];
253 } 253 }
254 254
255 - (void)updateSheetPosition { 255 - (void)updateSheetPosition {
256 // NOOP 256 // NOOP
257 } 257 }
258 258
259 - (void)resizeWithNewSize:(NSSize)size {
260 // NOOP
261 }
262
259 - (NSWindow*)sheetWindow { 263 - (NSWindow*)sheetWindow {
260 return panel_; 264 return panel_;
261 } 265 }
262 266
263 - (void)onConstrainedWindowClosed { 267 - (void)onConstrainedWindowClosed {
264 observer_->StopObserving(); 268 observer_->StopObserving();
265 panel_.reset(); 269 panel_.reset();
266 constrainedWindow_.reset(); 270 constrainedWindow_.reset();
267 [self release]; 271 [self release];
268 } 272 }
269 273
270 @end 274 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac.mm ('k') | chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698