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

Side by Side Diff: chrome/browser/cocoa/page_info_bubble_controller.h

Issue 3461016: [Mac] Convert the page info window to a bubble. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Address nits Created 10 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 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.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include "base/scoped_nsobject.h"
8 #include "base/scoped_ptr.h"
9 #import "chrome/browser/cocoa/base_bubble_controller.h"
10 #include "chrome/browser/page_info_model.h"
11
12 // This NSWindowController subclass manages the InfoBubbleWindow and view that
13 // are displayed when the user clicks the security lock icon.
14 @interface PageInfoBubbleController : BaseBubbleController {
15 @private
16 // The model that generates the content displayed by the controller.
17 scoped_ptr<PageInfoModel> model_;
18
19 // Thin bridge that pushes model-changed notifications from C++ to Cocoa.
20 scoped_ptr<PageInfoModel::PageInfoModelObserver> bridge_;
21
22 // The certificate ID for the page, 0 if the page is not over HTTPS.
23 int certID_;
24
25 // Reference to the images that are placed within the UI.
26 scoped_nsobject<NSImage> okImage_;
27 scoped_nsobject<NSImage> warningMinorImage_;
28 scoped_nsobject<NSImage> warningMajorImage_;
29 scoped_nsobject<NSImage> errorImage_;
30 }
31
32 @property (nonatomic, assign) int certID;
33
34 // Designated initializer. The new instance will take ownership of |model| and
35 // |bridge|. There should be a 1:1 mapping of models to bridges. The
36 // controller will release itself when the bubble is closed.
37 - (id)initWithPageInfoModel:(PageInfoModel*)model
38 modelObserver:(PageInfoModel::PageInfoModelObserver*)bridge
39 parentWindow:(NSWindow*)parentWindow;
40
41 // Shows the certificate display window. Note that this will implicitly close
42 // the bubble because the certificate window will become key. The certificate
43 // information attaches itself as a sheet to the |parentWindow|.
44 - (IBAction)showCertWindow:(id)sender;
45
46 @end
47
48 @interface PageInfoBubbleController (ExposedForUnitTesting)
49 - (void)performLayout;
50 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar/location_icon_decoration.mm ('k') | chrome/browser/cocoa/page_info_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698