OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "chrome/browser/page_info_model.h" | 9 #include "chrome/browser/page_info_model.h" |
10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
11 | 11 |
12 // This NSWindowController subclass manages the InfoBubbleWindow and view that | 12 // This NSWindowController subclass manages the InfoBubbleWindow and view that |
13 // are displayed when the user clicks the security lock icon. | 13 // are displayed when the user clicks the security lock icon. |
14 @interface PageInfoBubbleController : BaseBubbleController { | 14 @interface PageInfoBubbleController : BaseBubbleController { |
15 @private | 15 @private |
16 // The model that generates the content displayed by the controller. | 16 // The model that generates the content displayed by the controller. |
17 scoped_ptr<PageInfoModel> model_; | 17 scoped_ptr<PageInfoModel> model_; |
18 | 18 |
19 // Thin bridge that pushes model-changed notifications from C++ to Cocoa. | 19 // Thin bridge that pushes model-changed notifications from C++ to Cocoa. |
20 scoped_ptr<PageInfoModel::PageInfoModelObserver> bridge_; | 20 scoped_ptr<PageInfoModel::PageInfoModelObserver> bridge_; |
21 | 21 |
22 // The certificate ID for the page, 0 if the page is not over HTTPS. | 22 // The certificate ID for the page, 0 if the page is not over HTTPS. |
23 int certID_; | 23 int certID_; |
24 } | 24 } |
25 | 25 |
26 @property (nonatomic, assign) int certID; | 26 @property (nonatomic, assign) int certID; |
pink (ping after 24hrs)
2011/01/24 15:59:11
no space between @property and (
Robert Sesek
2011/01/24 16:39:56
The style guide doesn't have this, and we use a mi
Robert Sesek
2011/01/24 17:02:42
Removed.
| |
27 | 27 |
28 // Designated initializer. The new instance will take ownership of |model| and | 28 // Designated initializer. The new instance will take ownership of |model| and |
29 // |bridge|. There should be a 1:1 mapping of models to bridges. The | 29 // |bridge|. There should be a 1:1 mapping of models to bridges. The |
30 // controller will release itself when the bubble is closed. | 30 // controller will release itself when the bubble is closed. |
31 - (id)initWithPageInfoModel:(PageInfoModel*)model | 31 - (id)initWithPageInfoModel:(PageInfoModel*)model |
32 modelObserver:(PageInfoModel::PageInfoModelObserver*)bridge | 32 modelObserver:(PageInfoModel::PageInfoModelObserver*)bridge |
33 parentWindow:(NSWindow*)parentWindow; | 33 parentWindow:(NSWindow*)parentWindow; |
pink (ping after 24hrs)
2011/01/24 15:59:11
is |parentWindow| allowed to be nil? What happens
Robert Sesek
2011/01/24 16:39:56
Can't be nil and never is in practice. Added a com
| |
34 | 34 |
35 // Shows the certificate display window. Note that this will implicitly close | 35 // Shows the certificate display window. Note that this will implicitly close |
36 // the bubble because the certificate window will become key. The certificate | 36 // the bubble because the certificate window will become key. The certificate |
37 // information attaches itself as a sheet to the |parentWindow|. | 37 // information attaches itself as a sheet to the |parentWindow|. |
38 - (IBAction)showCertWindow:(id)sender; | 38 - (IBAction)showCertWindow:(id)sender; |
39 | 39 |
40 // Opens the help center link that explains the contents of the page info. | 40 // Opens the help center link that explains the contents of the page info. |
41 - (IBAction)showHelpPage:(id)sender; | 41 - (IBAction)showHelpPage:(id)sender; |
42 | 42 |
43 @end | 43 @end |
44 | 44 |
45 @interface PageInfoBubbleController (ExposedForUnitTesting) | 45 @interface PageInfoBubbleController (ExposedForUnitTesting) |
46 - (void)performLayout; | 46 - (void)performLayout; |
47 @end | 47 @end |
OLD | NEW |