OLD | NEW |
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 Loading... |
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, |
| 124 views::LabelButton* reset_decisions_button); |
122 // Handles LinkClicked asynchronously. | 125 // Handles LinkClicked asynchronously. |
123 void HandleLinkClickedAsync(views::Link* source); | 126 void HandleLinkClickedAsync(views::Link* source); |
| 127 // Handles ButtonPressed asynchronously. |
| 128 void HandleButtonPressedAsync(views::Button* button); |
124 | 129 |
125 // The web contents of the current tab. The popup can't live longer than a | 130 // The web contents of the current tab. The popup can't live longer than a |
126 // tab. | 131 // tab. |
127 content::WebContents* web_contents_; | 132 content::WebContents* web_contents_; |
128 | 133 |
129 // The Browser is used to load the help center page. | 134 // The Browser is used to load the help center page. |
130 Browser* browser_; | 135 Browser* browser_; |
131 | 136 |
132 // The presenter that controlls the Website Settings UI. | 137 // The presenter that controlls the Website Settings UI. |
133 scoped_ptr<WebsiteSettings> presenter_; | 138 scoped_ptr<WebsiteSettings> presenter_; |
(...skipping 18 matching lines...) Expand all Loading... |
152 // the site's identity. | 157 // the site's identity. |
153 views::View* identity_info_content_; | 158 views::View* identity_info_content_; |
154 // The link to open the certificate viewer for displaying the certificate | 159 // 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 | 160 // provided by the website. If the site does not provide a certificate then |
156 // |certificate_dialog_link_| is NULL. | 161 // |certificate_dialog_link_| is NULL. |
157 views::Link* certificate_dialog_link_; | 162 views::Link* certificate_dialog_link_; |
158 // The link to open the signed certificate timestamps viewer for displaying | 163 // The link to open the signed certificate timestamps viewer for displaying |
159 // Certificate Transparency info. If no such SCTs accompany the certificate | 164 // Certificate Transparency info. If no such SCTs accompany the certificate |
160 // then |signed_certificate_timestamps_link_| is NULL. | 165 // then |signed_certificate_timestamps_link_| is NULL. |
161 views::Link* signed_certificate_timestamps_link_; | 166 views::Link* signed_certificate_timestamps_link_; |
| 167 // The button to reset the Allow/Deny certificate errors decision for the |
| 168 // current host. |
| 169 views::LabelButton* reset_decisions_button_; |
162 | 170 |
163 // The id of the certificate provided by the site. If the site does not | 171 // The id of the certificate provided by the site. If the site does not |
164 // provide a certificate then |cert_id_| is 0. | 172 // provide a certificate then |cert_id_| is 0. |
165 int cert_id_; | 173 int cert_id_; |
166 // The IDs and validation status of Signed Certificate TImestamps provided | 174 // The IDs and validation status of Signed Certificate TImestamps provided |
167 // by the site. Empty if no SCTs accompany the certificate. | 175 // by the site. Empty if no SCTs accompany the certificate. |
168 content::SignedCertificateTimestampIDStatusList | 176 content::SignedCertificateTimestampIDStatusList |
169 signed_certificate_timestamp_ids_; | 177 signed_certificate_timestamp_ids_; |
170 | 178 |
171 // The link to open the help center page that contains more information about | 179 // The link to open the help center page that contains more information about |
172 // the connection status icons. | 180 // the connection status icons. |
173 views::Link* help_center_link_; | 181 views::Link* help_center_link_; |
174 | 182 |
175 views::View* connection_info_content_; | 183 views::View* connection_info_content_; |
176 views::View* page_info_content_; | 184 views::View* page_info_content_; |
177 | 185 |
178 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 186 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
179 | 187 |
180 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 188 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
181 }; | 189 }; |
182 | 190 |
183 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ | 191 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_
H_ |
OLD | NEW |