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

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

Issue 1674063002: Revert of [Reland] Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 127
128 status = net::x509_util::CreateRevocationPolicies(false, false, policies); 128 status = net::x509_util::CreateRevocationPolicies(false, false, policies);
129 if (status != noErr) { 129 if (status != noErr) {
130 NOTREACHED(); 130 NOTREACHED();
131 return; 131 return;
132 } 132 }
133 133
134 panel_.reset([[SFCertificatePanel alloc] init]); 134 panel_.reset([[SFCertificatePanel alloc] init]);
135 [panel_ setPolicies:(id) policies.get()]; 135 [panel_ setPolicies:(id) policies.get()];
136 136
137 constrainedWindow_ = 137 constrainedWindow_.reset(
138 CreateAndShowWebModalDialogMac(observer_.get(), webContents, self); 138 new ConstrainedWindowMac(observer_.get(), webContents, self));
139 } 139 }
140 140
141 - (NSWindow*)overlayWindow { 141 - (NSWindow*)overlayWindow {
142 return overlayWindow_; 142 return overlayWindow_;
143 } 143 }
144 144
145 - (void)showSheetForWindow:(NSWindow*)window { 145 - (void)showSheetForWindow:(NSWindow*)window {
146 overlayWindow_.reset([window retain]); 146 overlayWindow_.reset([window retain]);
147 [panel_ beginSheetForWindow:window 147 [panel_ beginSheetForWindow:window
148 modalDelegate:self 148 modalDelegate:self
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 - (void)makeSheetKeyAndOrderFront { 184 - (void)makeSheetKeyAndOrderFront {
185 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil]; 185 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil];
186 } 186 }
187 187
188 - (void)updateSheetPosition { 188 - (void)updateSheetPosition {
189 // NOOP 189 // NOOP
190 } 190 }
191 191
192 - (void)resizeWithNewSize:(NSSize)preferredSize {
193 // NOOP
194 }
195
196 - (NSWindow*)sheetWindow { 192 - (NSWindow*)sheetWindow {
197 return panel_; 193 return panel_;
198 } 194 }
199 195
200 - (void)onConstrainedWindowClosed { 196 - (void)onConstrainedWindowClosed {
201 panel_.reset(); 197 panel_.reset();
202 constrainedWindow_.reset(); 198 constrainedWindow_.reset();
203 [self release]; 199 [self release];
204 } 200 }
205 201
206 @end 202 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/certificate_viewer_mac.h ('k') | chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698