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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.h

Issue 418133012: Add button to page info to revoke user certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h" 13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h"
14 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
15 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" 15 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
16 #include "ui/views/bubble/bubble_delegate.h" 16 #include "ui/views/bubble/bubble_delegate.h"
17 #include "ui/views/controls/button/button.h" 17 #include "ui/views/controls/button/button.h"
18 #include "ui/views/controls/button/label_button.h"
18 #include "ui/views/controls/link_listener.h" 19 #include "ui/views/controls/link_listener.h"
19 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 20 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
20 21
21 class Browser; 22 class Browser;
22 class GURL; 23 class GURL;
23 class PermissionSelectorView; 24 class PermissionSelectorView;
24 class PopupHeaderView; 25 class PopupHeaderView;
25 class Profile; 26 class Profile;
26 27
27 namespace content { 28 namespace content {
28 struct SSLStatus; 29 struct SSLStatus;
29 class WebContents; 30 class WebContents;
30 } 31 }
31 32
32 namespace views { 33 namespace views {
34 class LabelButton;
33 class Link; 35 class Link;
34 class TabbedPane; 36 class TabbedPane;
35 class Widget; 37 class Widget;
36 } 38 }
37 39
38 // The views implementation of the website settings UI. 40 // The views implementation of the website settings UI.
39 class WebsiteSettingsPopupView 41 class WebsiteSettingsPopupView
40 : public PermissionSelectorViewObserver, 42 : public PermissionSelectorViewObserver,
41 public views::BubbleDelegateView, 43 public views::BubbleDelegateView,
42 public views::ButtonListener, 44 public views::ButtonListener,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // are cleared and destroyed first. Then the |icon|, |headline|, |text| and 113 // are cleared and destroyed first. Then the |icon|, |headline|, |text| and
112 // |link| are layout out properly. If the |headline| is an empty string then 114 // |link| are layout out properly. If the |headline| is an empty string then
113 // no headline will be displayed. The ownership of the passed |link| is 115 // no headline will be displayed. The ownership of the passed |link| is
114 // transfered to the ResetConnectionSection method and the |link| is added to 116 // transfered to the ResetConnectionSection method and the |link| is added to
115 // the views hierarchy. If the |link| is NULL then no link is be displayed. 117 // the views hierarchy. If the |link| is NULL then no link is be displayed.
116 void ResetConnectionSection(views::View* section_container, 118 void ResetConnectionSection(views::View* section_container,
117 const gfx::Image& icon, 119 const gfx::Image& icon,
118 const base::string16& headline, 120 const base::string16& headline,
119 const base::string16& text, 121 const base::string16& text,
120 views::Link* link, 122 views::Link* link,
121 views::Link* secondary_link); 123 views::Link* secondary_link,
122 // Handles LinkClicked asynchronously. 124 views::LabelButton* reset_decisions_button);
123 void HandleLinkClickedAsync(views::Link* source);
124 125
125 // The web contents of the current tab. The popup can't live longer than a 126 // The web contents of the current tab. The popup can't live longer than a
126 // tab. 127 // tab.
127 content::WebContents* web_contents_; 128 content::WebContents* web_contents_;
128 129
129 // The Browser is used to load the help center page. 130 // The Browser is used to load the help center page.
130 Browser* browser_; 131 Browser* browser_;
131 132
132 // The presenter that controlls the Website Settings UI. 133 // The presenter that controlls the Website Settings UI.
133 scoped_ptr<WebsiteSettings> presenter_; 134 scoped_ptr<WebsiteSettings> presenter_;
(...skipping 18 matching lines...) Expand all
152 // the site's identity. 153 // the site's identity.
153 views::View* identity_info_content_; 154 views::View* identity_info_content_;
154 // The link to open the certificate viewer for displaying the certificate 155 // The link to open the certificate viewer for displaying the certificate
155 // provided by the website. If the site does not provide a certificate then 156 // provided by the website. If the site does not provide a certificate then
156 // |certificate_dialog_link_| is NULL. 157 // |certificate_dialog_link_| is NULL.
157 views::Link* certificate_dialog_link_; 158 views::Link* certificate_dialog_link_;
158 // The link to open the signed certificate timestamps viewer for displaying 159 // The link to open the signed certificate timestamps viewer for displaying
159 // Certificate Transparency info. If no such SCTs accompany the certificate 160 // Certificate Transparency info. If no such SCTs accompany the certificate
160 // then |signed_certificate_timestamps_link_| is NULL. 161 // then |signed_certificate_timestamps_link_| is NULL.
161 views::Link* signed_certificate_timestamps_link_; 162 views::Link* signed_certificate_timestamps_link_;
163 // The button to reset the Allow/Deny certificate errors decision for the
164 // current host.
165 views::LabelButton* reset_decisions_button_;
162 166
163 // The id of the certificate provided by the site. If the site does not 167 // The id of the certificate provided by the site. If the site does not
164 // provide a certificate then |cert_id_| is 0. 168 // provide a certificate then |cert_id_| is 0.
165 int cert_id_; 169 int cert_id_;
166 // The IDs and validation status of Signed Certificate TImestamps provided 170 // The IDs and validation status of Signed Certificate TImestamps provided
167 // by the site. Empty if no SCTs accompany the certificate. 171 // by the site. Empty if no SCTs accompany the certificate.
168 content::SignedCertificateTimestampIDStatusList 172 content::SignedCertificateTimestampIDStatusList
169 signed_certificate_timestamp_ids_; 173 signed_certificate_timestamp_ids_;
170 174
171 // The link to open the help center page that contains more information about 175 // The link to open the help center page that contains more information about
172 // the connection status icons. 176 // the connection status icons.
173 views::Link* help_center_link_; 177 views::Link* help_center_link_;
174 178
175 views::View* connection_info_content_; 179 views::View* connection_info_content_;
176 views::View* page_info_content_; 180 views::View* page_info_content_;
177 181
178 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; 182 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
179 183
180 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 184 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
181 }; 185 };
182 186
183 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 187 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698