Chromium Code Reviews| 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 #import "ui/base/cocoa/flipped_view.h" | |
| 17 | 18 |
| 18 class PageInfoUIBridge; | 19 class PageInfoUIBridge; |
| 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 |
| 33 @interface InspectLinkView : FlippedView { | |
| 34 @private | |
| 35 NSButton* actionLink_; | |
| 36 } | |
| 37 | |
| 38 - (id)initWithFrame:(NSRect)frame; | |
| 39 @end | |
| 40 | |
| 32 // This NSWindowController subclass manages the InfoBubbleWindow and view that | 41 // This NSWindowController subclass manages the InfoBubbleWindow and view that |
| 33 // are displayed when the user clicks the favicon or security lock icon. | 42 // are displayed when the user clicks the Page Info icon. |
|
lgarron
2017/04/20 19:12:56
Nit: I usually call this the "omnibox security ind
elawrence
2017/04/27 14:56:34
Done.
| |
| 34 @interface PageInfoBubbleController : OmniboxDecorationBubbleController { | 43 @interface PageInfoBubbleController : OmniboxDecorationBubbleController { |
| 35 @private | 44 @private |
| 36 content::WebContents* webContents_; | 45 content::WebContents* webContents_; |
| 37 | 46 |
| 38 base::scoped_nsobject<NSView> contentView_; | 47 base::scoped_nsobject<NSView> contentView_; |
| 39 | 48 |
| 40 // The main content view for the Permissions tab. | 49 // The main content view for the Permissions tab. |
| 41 NSView* securitySectionView_; | 50 NSView* securitySectionView_; |
| 42 | 51 |
| 43 // Displays the short security summary for the page | 52 // 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. | 64 // URL of the page for which the bubble is shown. |
| 56 GURL url_; | 65 GURL url_; |
| 57 | 66 |
| 58 // Displays a paragraph to accompany the reset decisions button, explaining | 67 // Displays a paragraph to accompany the reset decisions button, explaining |
| 59 // that the user has made a decision to trust an invalid security certificate | 68 // that the user has made a decision to trust an invalid security certificate |
| 60 // for the current site. | 69 // for the current site. |
| 61 // This field only shows when there is an acrive certificate exception. | 70 // This field only shows when there is an acrive certificate exception. |
| 62 NSTextField* resetDecisionsField_; | 71 NSTextField* resetDecisionsField_; |
| 63 | 72 |
| 64 // The link button for revoking certificate decisions. | 73 // The link button for revoking certificate decisions. |
| 65 // This link only shows when there is an acrive certificate exception. | 74 // This link only shows when there is an active certificate exception. |
| 66 NSButton* resetDecisionsButton_; | 75 NSButton* resetDecisionsButton_; |
| 67 | 76 |
| 68 // The server certificate from the identity info. This should always be | 77 // The server certificate from the identity info. This should always be |
| 69 // non-null on a cryptographic connection, and null otherwise. | 78 // non-null on a cryptographic connection, and null otherwise. |
| 70 scoped_refptr<net::X509Certificate> certificate_; | 79 scoped_refptr<net::X509Certificate> certificate_; |
| 71 | 80 |
| 72 // Separator line. | 81 // Separator line. |
| 73 NSView* separatorAfterSecuritySection_; | 82 NSView* separatorAfterSecuritySection_; |
| 74 | 83 |
| 75 // Container for the site settings section. | 84 // Container for the site settings section. |
| 76 NSView* siteSettingsSectionView_; | 85 NSView* siteSettingsSectionView_; |
| 77 | 86 |
| 87 // Container for certificate info in the site settings section. | |
| 88 InspectLinkView* certificateView_; | |
| 89 | |
| 78 // Container for cookies info in the site settings section. | 90 // Container for cookies info in the site settings section. |
| 79 NSView* cookiesView_; | 91 InspectLinkView* cookiesView_; |
| 80 | 92 |
| 81 // Container for permission info in the site settings section. | 93 // Container for permission info in the site settings section. |
| 82 NSView* permissionsView_; | 94 NSView* permissionsView_; |
| 83 | 95 |
| 84 // Whether the permissionView_ shows anything. | 96 // Whether the permissionView_ shows anything. |
| 85 BOOL permissionsPresent_; | 97 BOOL permissionsPresent_; |
| 86 | 98 |
| 87 // The link button for showing site settings. | 99 // The link button for showing site settings. |
| 88 NSButton* siteSettingsButton_; | 100 NSButton* siteSettingsButton_; |
| 89 | 101 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 // The WebContents the bubble UI is attached to. | 157 // The WebContents the bubble UI is attached to. |
| 146 content::WebContents* web_contents_; | 158 content::WebContents* web_contents_; |
| 147 | 159 |
| 148 // The Cocoa controller for the bubble UI. | 160 // The Cocoa controller for the bubble UI. |
| 149 PageInfoBubbleController* bubble_controller_; | 161 PageInfoBubbleController* bubble_controller_; |
| 150 | 162 |
| 151 DISALLOW_COPY_AND_ASSIGN(PageInfoUIBridge); | 163 DISALLOW_COPY_AND_ASSIGN(PageInfoUIBridge); |
| 152 }; | 164 }; |
| 153 | 165 |
| 154 #endif // CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ | 166 #endif // CHROME_BROWSER_UI_COCOA_PAGE_INFO_PAGE_INFO_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |