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 30 matching lines...) Expand all Loading... |
41 public: | 41 public: |
42 explicit SSLCertificateViewerCocoaBridge(SSLCertificateViewerCocoa * | 42 explicit SSLCertificateViewerCocoaBridge(SSLCertificateViewerCocoa * |
43 controller) | 43 controller) |
44 : controller_(controller) { | 44 : controller_(controller) { |
45 } | 45 } |
46 | 46 |
47 virtual ~SSLCertificateViewerCocoaBridge() {} | 47 virtual ~SSLCertificateViewerCocoaBridge() {} |
48 | 48 |
49 // ConstrainedWindowMacDelegate implementation: | 49 // ConstrainedWindowMacDelegate implementation: |
50 virtual void OnConstrainedWindowClosed( | 50 virtual void OnConstrainedWindowClosed( |
51 ConstrainedWindowMac * window) OVERRIDE { | 51 ConstrainedWindowMac * window) override { |
52 // |onConstrainedWindowClosed| will delete the sheet which might be still | 52 // |onConstrainedWindowClosed| will delete the sheet which might be still |
53 // in use higher up the call stack. Wait for the next cycle of the event | 53 // in use higher up the call stack. Wait for the next cycle of the event |
54 // loop to call this function. | 54 // loop to call this function. |
55 [controller_ performSelector:@selector(onConstrainedWindowClosed) | 55 [controller_ performSelector:@selector(onConstrainedWindowClosed) |
56 withObject:nil | 56 withObject:nil |
57 afterDelay:0]; | 57 afterDelay:0]; |
58 } | 58 } |
59 | 59 |
60 private: | 60 private: |
61 SSLCertificateViewerCocoa* controller_; // weak | 61 SSLCertificateViewerCocoa* controller_; // weak |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // NOOP | 198 // NOOP |
199 } | 199 } |
200 | 200 |
201 - (void)onConstrainedWindowClosed { | 201 - (void)onConstrainedWindowClosed { |
202 panel_.reset(); | 202 panel_.reset(); |
203 constrainedWindow_.reset(); | 203 constrainedWindow_.reset(); |
204 [self release]; | 204 [self release]; |
205 } | 205 } |
206 | 206 |
207 @end | 207 @end |
OLD | NEW |