Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1234)

Unified Diff: chrome/browser/mac/certificate_viewer_base.h

Issue 1779383002: MacViews: Remove constrained window dependencies for certificate viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Position correctly (kind of) & block on tab only. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « no previous file | chrome/browser/mac/certificate_viewer_base.mm » ('j') | chrome/browser/mac/certificate_viewer_base.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698