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

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

Issue 1430023002: Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/certificate_viewer_mac.h" 5 #import "chrome/browser/ui/cocoa/certificate_viewer_mac.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 #include <SecurityInterface/SFCertificatePanel.h> 8 #include <SecurityInterface/SFCertificatePanel.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 status = net::x509_util::CreateRevocationPolicies(false, false, policies); 127 status = net::x509_util::CreateRevocationPolicies(false, false, policies);
128 if (status != noErr) { 128 if (status != noErr) {
129 NOTREACHED(); 129 NOTREACHED();
130 return; 130 return;
131 } 131 }
132 132
133 panel_.reset([[SFCertificatePanel alloc] init]); 133 panel_.reset([[SFCertificatePanel alloc] init]);
134 [panel_ setPolicies:(id) policies.get()]; 134 [panel_ setPolicies:(id) policies.get()];
135 135
136 constrainedWindow_.reset( 136 constrainedWindow_.reset(
137 new ConstrainedWindowMac(observer_.get(), webContents, self)); 137 ShowWebModalDialogMac(observer_.get(), webContents, self));
138 } 138 }
139 139
140 - (NSWindow*)overlayWindow { 140 - (NSWindow*)overlayWindow {
141 return overlayWindow_; 141 return overlayWindow_;
142 } 142 }
143 143
144 - (void)showSheetForWindow:(NSWindow*)window { 144 - (void)showSheetForWindow:(NSWindow*)window {
145 overlayWindow_.reset([window retain]); 145 overlayWindow_.reset([window retain]);
146 [panel_ beginSheetForWindow:window 146 [panel_ beginSheetForWindow:window
147 modalDelegate:self 147 modalDelegate:self
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 - (void)makeSheetKeyAndOrderFront { 192 - (void)makeSheetKeyAndOrderFront {
193 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil]; 193 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil];
194 } 194 }
195 195
196 - (void)updateSheetPosition { 196 - (void)updateSheetPosition {
197 // NOOP 197 // NOOP
198 } 198 }
199 199
200 - (void)ResizeWithNewSize:(NSSize)preferredSize {
201 // NOOP
202 }
203
200 - (NSWindow*)sheetWindow { 204 - (NSWindow*)sheetWindow {
201 return panel_; 205 return panel_;
202 } 206 }
203 207
204 - (void)onConstrainedWindowClosed { 208 - (void)onConstrainedWindowClosed {
205 panel_.reset(); 209 panel_.reset();
206 constrainedWindow_.reset(); 210 constrainedWindow_.reset();
207 [self release]; 211 [self release];
208 } 212 }
209 213
210 @end 214 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698