Index: chrome/browser/mac/certificate_viewer_base.h |
diff --git a/chrome/browser/mac/certificate_viewer_base.h b/chrome/browser/mac/certificate_viewer_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8c1075a679ef0e89db02404c614d99cee196bdb4 |
--- /dev/null |
+++ b/chrome/browser/mac/certificate_viewer_base.h |
@@ -0,0 +1,55 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
tapted
2016/03/21 02:47:12
I think we want to leave this as chrome/browser/ui
Patti Lor
2016/05/03 00:04:59
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_MAC_CERTIFICATE_VIEWER_BASE_H_ |
+ |
tapted
2016/03/21 02:47:12
no blank line
Patti Lor
2016/05/03 00:04:59
Done.
|
+#define CHROME_BROWSER_MAC_CERTIFICATE_VIEWER_BASE_H_ |
+ |
+#import <Cocoa/Cocoa.h> |
+#import <Security/Security.h> |
+#import <SecurityInterface/SFCertificatePanel.h> |
tapted
2016/03/21 02:47:12
can you just forward-declare
@class SFCertificat
Patti Lor
2016/05/03 00:04:59
certificate_viewer.mac.mm complains it can't find
|
+ |
+#include "base/mac/scoped_nsobject.h" |
+#include "base/memory/scoped_ptr.h" |
tapted
2016/03/21 02:47:12
unused?
Patti Lor
2016/05/03 00:04:59
Done, have moved this to certificate_viewer_views_
|
+#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h" |
+#include "content/public/browser/web_contents.h" |
tapted
2016/03/21 02:47:12
forward declare
Patti Lor
2016/05/03 00:04:59
Done.
|
+ |
tapted
2016/03/21 02:47:12
remove extra blank line
Patti Lor
2016/05/03 00:04:59
Done.
|
+ |
+namespace net { |
+class X509Certificate; |
+} |
+ |
+@interface SFCertificatePanel (SystemPrivate) |
+// A system-private interface that dismisses a panel whose sheet was started by |
+// -beginSheetForWindow: |
+// modalDelegate: |
+// didEndSelector: |
+// contextInfo: |
+// certificates: |
+// showGroup: |
+// as though the user clicked the button identified by returnCode. Verified |
+// present in 10.8. |
+- (void)_dismissWithCode:(NSInteger)code; |
+@end |
+ |
+@interface SSLCertificateViewerMacBase : NSObject<ConstrainedWindowSheet> { |
tapted
2016/03/21 02:47:12
I'd call this just SSLCertificateViewerMac - then
Patti Lor
2016/05/03 00:04:59
Done.
|
+ @protected |
+ // The corresponding list of certificates. |
+ base::scoped_nsobject<NSArray> certificates_; |
+ base::scoped_nsobject<SFCertificatePanel> panel_; |
+ base::scoped_nsobject<NSWindow> overlayWindow_; |
+ BOOL closePending_; |
+ // A copy of the sheet's |autoresizesSubviews| flag to restore on show. |
+ BOOL oldResizesSubviews_; |
+} |
+ |
+- (id)initWithCertificate:(net::X509Certificate*)certificate; |
+ |
+- (void)displayForWebContents:(content::WebContents*)webContents; |
+ |
+- (NSWindow*)overlayWindow; |
+ |
+@end |
+ |
+#endif // CHROME_BROWSER_MAC_CERTIFICATE_VIEWER_BASE_H_ |