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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 const PermissionInfoList& permission_info_list, | 123 const PermissionInfoList& permission_info_list, |
124 const ChosenObjectInfoList& chosen_object_info_list) override; | 124 const ChosenObjectInfoList& chosen_object_info_list) override; |
125 void SetIdentityInfo(const IdentityInfo& identity_info) override; | 125 void SetIdentityInfo(const IdentityInfo& identity_info) override; |
126 // TODO(lgarron): Remove SetSelectedTab() with https://crbug.com/571533 | 126 // TODO(lgarron): Remove SetSelectedTab() with https://crbug.com/571533 |
127 void SetSelectedTab(TabId tab_id) override; | 127 void SetSelectedTab(TabId tab_id) override; |
128 | 128 |
129 // Creates the contents of the |site_settings_view_|. The ownership of the | 129 // Creates the contents of the |site_settings_view_|. The ownership of the |
130 // returned view is transferred to the caller. | 130 // returned view is transferred to the caller. |
131 views::View* CreateSiteSettingsView() WARN_UNUSED_RESULT; | 131 views::View* CreateSiteSettingsView() WARN_UNUSED_RESULT; |
132 | 132 |
133 // The site settings view contains several sections with a |headline| | |
134 // followed by the section |contents| and an optional |link|. This method | |
135 // creates a section for the given |headline|, |contents| and |link|. |link| | |
136 // can be NULL if the section should not contain a link. | |
137 views::View* CreateSection(const base::string16& headline, | |
138 views::View* contents, | |
139 views::Link* link) WARN_UNUSED_RESULT; | |
140 | |
141 // Used to asynchronously handle clicks since these calls may cause the | 133 // Used to asynchronously handle clicks since these calls may cause the |
142 // destruction of the settings view and the base class window still needs to | 134 // destruction of the settings view and the base class window still needs to |
143 // be alive to finish handling the mouse or keyboard click. | 135 // be alive to finish handling the mouse or keyboard click. |
144 void HandleLinkClickedAsync(views::Link* source); | 136 void HandleLinkClickedAsync(views::Link* source); |
145 | 137 |
146 // Whether DevTools is disabled for the relevant profile. | 138 // Whether DevTools is disabled for the relevant profile. |
147 bool is_devtools_disabled_; | 139 bool is_devtools_disabled_; |
148 | 140 |
149 // The presenter that controls the Website Settings UI. | 141 // The presenter that controls the Website Settings UI. |
150 std::unique_ptr<WebsiteSettings> presenter_; | 142 std::unique_ptr<WebsiteSettings> presenter_; |
151 | 143 |
152 // The header section (containing security-related information). | 144 // The header section (containing security-related information). |
153 PopupHeaderView* header_; | 145 PopupHeaderView* header_; |
154 | 146 |
155 // The separator between the header and the site settings view. | 147 // The separator between the header and the site settings view. |
156 views::Separator* separator_; | 148 views::Separator* separator_; |
157 | 149 |
158 // The view that contains the site data and permissions sections. | 150 // The view that contains the cookie and permissions sections. |
159 views::View* site_settings_view_; | 151 views::View* site_settings_view_; |
160 // The view that contains the contents of the "Cookies and Site data" section | 152 // The view that contains the contents of the "Cookies" part of the site |
161 // of the site settings view. | 153 // settings view. |
162 views::View* site_data_content_; | 154 views::View* cookies_view_; |
163 // The link that opens the "Cookies" dialog. | 155 // The link that opens the "Cookies" dialog. |
164 views::Link* cookie_dialog_link_; | 156 views::Link* cookie_dialog_link_; |
165 // The view that contains the contents of the "Permissions" section | 157 // The view that contains the "Permissions" table of the site settings view. |
166 // of the site settings view. | 158 views::View* permissions_view_; |
167 views::View* permissions_content_; | |
168 | 159 |
169 // The certificate provided by the site, if one exists. | 160 // The certificate provided by the site, if one exists. |
170 scoped_refptr<net::X509Certificate> certificate_; | 161 scoped_refptr<net::X509Certificate> certificate_; |
171 | 162 |
172 // The link to open the site settings page that provides full control over | 163 // The button to open the site settings page that provides full control over |
173 // the origin's permissions. | 164 // the origin's permissions. |
174 views::Link* site_settings_link_; | 165 views::Link* site_settings_button_; |
msw
2016/09/26 20:47:56
nit: avoid 'button' naming for views::Link instanc
lgarron
2016/09/28 21:11:47
Even when the link is styled like a button?
msw
2016/09/30 00:37:04
If it were actually a views::Link*, then yes.
lgarron
2016/09/30 05:05:55
Acknowledged (although the var has now been remove
| |
175 | 166 |
176 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; | 167 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; |
177 | 168 |
178 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); | 169 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); |
179 }; | 170 }; |
180 | 171 |
181 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ | 172 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ |
OLD | NEW |