| 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/certificate_viewer_mac.h" | 5 #import "chrome/browser/ui/certificate_viewer_mac.h" | 
| 6 | 6 | 
| 7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> | 
| 8 | 8 | 
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" | 
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" | 
| 11 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" | 
| 12 #import "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" | 
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" | 
| 14 #include "net/cert/x509_certificate.h" | 14 #include "net/cert/x509_certificate.h" | 
|  | 15 #include "net/cert/x509_util_ios_and_mac.h" | 
| 15 #include "net/cert/x509_util_mac.h" | 16 #include "net/cert/x509_util_mac.h" | 
| 16 | 17 | 
| 17 namespace { | 18 namespace { | 
| 18 | 19 | 
| 19 // The maximum height of the certificate panel. Imposed whenever Sierra's buggy | 20 // The maximum height of the certificate panel. Imposed whenever Sierra's buggy | 
| 20 // autolayout algorithm tries to change it. Doesn't affect user resizes. | 21 // autolayout algorithm tries to change it. Doesn't affect user resizes. | 
| 21 const CGFloat kMaxPanelSetFrameHeight = 400; | 22 const CGFloat kMaxPanelSetFrameHeight = 400; | 
| 22 | 23 | 
| 23 // Pointer to the real implementation of -[SFCertificatePanel setFrame:..]. This | 24 // Pointer to the real implementation of -[SFCertificatePanel setFrame:..]. This | 
| 24 // is cached so a correct lookup is performed before we add the override. | 25 // is cached so a correct lookup is performed before we add the override. | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175 | 176 | 
| 176 - (void)releaseSheetWindow { | 177 - (void)releaseSheetWindow { | 
| 177   panel_.reset(); | 178   panel_.reset(); | 
| 178 } | 179 } | 
| 179 | 180 | 
| 180 - (NSWindow*)certificatePanel { | 181 - (NSWindow*)certificatePanel { | 
| 181   return panel_; | 182   return panel_; | 
| 182 } | 183 } | 
| 183 | 184 | 
| 184 @end | 185 @end | 
| OLD | NEW | 
|---|