OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #import "chrome/browser/ui/cocoa/omnibox_decoration_bubble_controller.h" | 14 #import "chrome/browser/ui/cocoa/omnibox_decoration_bubble_controller.h" |
15 #include "chrome/browser/ui/page_info/page_info_ui.h" | 15 #include "chrome/browser/ui/page_info/page_info_ui.h" |
16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
17 | 17 |
18 class PageInfoUIBridge; | 18 class PageInfoUIBridge; |
| 19 @class InspectLinkView; |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 class WebContents; | 22 class WebContents; |
22 } | 23 } |
23 | 24 |
24 namespace net { | 25 namespace net { |
25 class X509Certificate; | 26 class X509Certificate; |
26 } | 27 } |
27 | 28 |
28 namespace security_state { | 29 namespace security_state { |
29 struct SecurityInfo; | 30 struct SecurityInfo; |
30 } // namespace security_state | 31 } // namespace security_state |
31 | 32 |
32 // This NSWindowController subclass manages the InfoBubbleWindow and view that | 33 // This NSWindowController subclass manages the InfoBubbleWindow and view that |
33 // are displayed when the user clicks the favicon or security lock icon. | 34 // are displayed when the user clicks the omnibox security indicator icon. |
34 @interface PageInfoBubbleController : OmniboxDecorationBubbleController { | 35 @interface PageInfoBubbleController : OmniboxDecorationBubbleController { |
35 @private | 36 @private |
36 content::WebContents* webContents_; | 37 content::WebContents* webContents_; |
37 | 38 |
38 base::scoped_nsobject<NSView> contentView_; | 39 base::scoped_nsobject<NSView> contentView_; |
39 | 40 |
40 // The main content view for the Permissions tab. | 41 // The main content view for the Permissions tab. |
41 NSView* securitySectionView_; | 42 NSView* securitySectionView_; |
42 | 43 |
43 // Displays the short security summary for the page | 44 // Displays the short security summary for the page |
(...skipping 11 matching lines...) Expand all Loading... |
55 // URL of the page for which the bubble is shown. | 56 // URL of the page for which the bubble is shown. |
56 GURL url_; | 57 GURL url_; |
57 | 58 |
58 // Displays a paragraph to accompany the reset decisions button, explaining | 59 // Displays a paragraph to accompany the reset decisions button, explaining |
59 // that the user has made a decision to trust an invalid security certificate | 60 // that the user has made a decision to trust an invalid security certificate |
60 // for the current site. | 61 // for the current site. |
61 // This field only shows when there is an acrive certificate exception. | 62 // This field only shows when there is an acrive certificate exception. |
62 NSTextField* resetDecisionsField_; | 63 NSTextField* resetDecisionsField_; |
63 | 64 |
64 // The link button for revoking certificate decisions. | 65 // The link button for revoking certificate decisions. |
65 // This link only shows when there is an acrive certificate exception. | 66 // This link only shows when there is an active certificate exception. |
66 NSButton* resetDecisionsButton_; | 67 NSButton* resetDecisionsButton_; |
67 | 68 |
68 // The server certificate from the identity info. This should always be | 69 // The server certificate from the identity info. This should always be |
69 // non-null on a cryptographic connection, and null otherwise. | 70 // non-null on a cryptographic connection, and null otherwise. |
70 scoped_refptr<net::X509Certificate> certificate_; | 71 scoped_refptr<net::X509Certificate> certificate_; |
71 | 72 |
72 // Separator line. | 73 // Separator line. |
73 NSView* separatorAfterSecuritySection_; | 74 NSView* separatorAfterSecuritySection_; |
74 | 75 |
75 // Container for the site settings section. | 76 // Container for the site settings section. |
76 NSView* siteSettingsSectionView_; | 77 NSView* siteSettingsSectionView_; |
77 | 78 |
| 79 // Container for certificate info in the site settings section. |
| 80 InspectLinkView* certificateView_; |
| 81 |
78 // Container for cookies info in the site settings section. | 82 // Container for cookies info in the site settings section. |
79 NSView* cookiesView_; | 83 InspectLinkView* cookiesView_; |
80 | 84 |
81 // Container for permission info in the site settings section. | 85 // Container for permission info in the site settings section. |
82 NSView* permissionsView_; | 86 NSView* permissionsView_; |
83 | 87 |
84 // Whether the permissionView_ shows anything. | 88 // Whether the permissionView_ shows anything. |
85 BOOL permissionsPresent_; | 89 BOOL permissionsPresent_; |
86 | 90 |
87 // The link button for showing site settings. | 91 // The link button for showing site settings. |
88 NSButton* siteSettingsButton_; | 92 NSButton* siteSettingsButton_; |
89 | 93 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // The WebContents the bubble UI is attached to. | 149 // The WebContents the bubble UI is attached to. |
146 content::WebContents* web_contents_; | 150 content::WebContents* web_contents_; |
147 | 151 |
148 // The Cocoa controller for the bubble UI. | 152 // The Cocoa controller for the bubble UI. |
149 PageInfoBubbleController* bubble_controller_; | 153 PageInfoBubbleController* bubble_controller_; |
150 | 154 |
151 DISALLOW_COPY_AND_ASSIGN(PageInfoUIBridge); | 155 DISALLOW_COPY_AND_ASSIGN(PageInfoUIBridge); |
152 }; | 156 }; |
153 | 157 |
154 #endif // CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ | 158 #endif // CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ |
OLD | NEW |