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