Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / certificate_viewer_mac.h
blobf33bef2d5db39ae35258f0dcf874b820ef831351
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_CERTIFICATE_VIEWER_MAC_H_
7 #define CHROME_BROWSER_UI_COCOA_CERTIFICATE_VIEWER_MAC_H_
9 #include "base/mac/scoped_nsobject.h"
10 #include "base/memory/scoped_ptr.h"
11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
12 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
14 class SSLCertificateViewerCocoaBridge;
15 @class SFCertificatePanel;
17 namespace net {
18 class X509Certificate;
21 @interface SSLCertificateViewerCocoa : NSObject<ConstrainedWindowSheet> {
22 @private
23 // The corresponding list of certificates.
24 base::scoped_nsobject<NSArray> certificates_;
25 scoped_ptr<SSLCertificateViewerCocoaBridge> observer_;
26 base::scoped_nsobject<SFCertificatePanel> panel_;
27 scoped_ptr<ConstrainedWindowMac> constrainedWindow_;
28 base::scoped_nsobject<NSWindow> overlayWindow_;
29 BOOL closePending_;
30 // A copy of the sheet's frame used to restore on show.
31 NSRect oldSheetFrame_;
32 // A copy of the sheet's |autoresizesSubviews| flag to restore on show.
33 BOOL oldResizesSubviews_;
36 - (id)initWithCertificate:(net::X509Certificate*)certificate;
38 - (void)displayForWebContents:(content::WebContents*)webContents;
40 - (NSWindow*)overlayWindow;
42 @end
44 #endif // CHROME_BROWSER_UI_COCOA_CERTIFICATE_VIEWER_MAC_H_