OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |