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

Side by Side Diff: chrome/browser/ui/views/page_info/page_info_bubble_view.h

Issue 2846913002: Add a Certificate Viewer link to the Page Info dropdown (Closed)
Patch Set: Address nits Created 3 years, 7 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
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_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/ui/page_info/page_info_ui.h" 14 #include "chrome/browser/ui/page_info/page_info_ui.h"
14 #include "chrome/browser/ui/views/page_info/chosen_object_row_observer.h" 15 #include "chrome/browser/ui/views/page_info/chosen_object_row_observer.h"
15 #include "chrome/browser/ui/views/page_info/permission_selector_row.h" 16 #include "chrome/browser/ui/views/page_info/permission_selector_row.h"
16 #include "chrome/browser/ui/views/page_info/permission_selector_row_observer.h" 17 #include "chrome/browser/ui/views/page_info/permission_selector_row_observer.h"
17 #include "content/public/browser/web_contents_observer.h" 18 #include "content/public/browser/web_contents_observer.h"
18 #include "ui/views/bubble/bubble_dialog_delegate.h" 19 #include "ui/views/bubble/bubble_dialog_delegate.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // PageInfoUI implementations. 131 // PageInfoUI implementations.
131 void SetCookieInfo(const CookieInfoList& cookie_info_list) override; 132 void SetCookieInfo(const CookieInfoList& cookie_info_list) override;
132 void SetPermissionInfo(const PermissionInfoList& permission_info_list, 133 void SetPermissionInfo(const PermissionInfoList& permission_info_list,
133 ChosenObjectInfoList chosen_object_info_list) override; 134 ChosenObjectInfoList chosen_object_info_list) override;
134 void SetIdentityInfo(const IdentityInfo& identity_info) override; 135 void SetIdentityInfo(const IdentityInfo& identity_info) override;
135 136
136 // Creates the contents of the |site_settings_view_|. The ownership of the 137 // Creates the contents of the |site_settings_view_|. The ownership of the
137 // returned view is transferred to the caller. 138 // returned view is transferred to the caller.
138 views::View* CreateSiteSettingsView(int side_margin) WARN_UNUSED_RESULT; 139 views::View* CreateSiteSettingsView(int side_margin) WARN_UNUSED_RESULT;
139 140
141 // Creates a section containing a title, icon, and link. Used to display
142 // Cookies and Certificate information.
143 views::View* CreateInspectSection(const gfx::ImageSkia& image_icon,
144 const int title_id,
145 views::Link* link) WARN_UNUSED_RESULT;
146
140 // Used to asynchronously handle clicks since these calls may cause the 147 // Used to asynchronously handle clicks since these calls may cause the
141 // destruction of the settings view and the base class window still needs to 148 // destruction of the settings view and the base class window still needs to
142 // be alive to finish handling the mouse or keyboard click. 149 // be alive to finish handling the mouse or keyboard click.
143 void HandleLinkClickedAsync(views::Link* source); 150 void HandleLinkClickedAsync(views::Link* source);
144 151
145 // Whether DevTools is disabled for the relevant profile.
146 bool is_devtools_disabled_;
147
148 // The presenter that controls the Page Info UI. 152 // The presenter that controls the Page Info UI.
149 std::unique_ptr<PageInfo> presenter_; 153 std::unique_ptr<PageInfo> presenter_;
150 154
151 Profile* profile_; 155 Profile* profile_;
152 156
153 // The header section (containing security-related information). 157 // The header section (containing security-related information).
154 BubbleHeaderView* header_; 158 BubbleHeaderView* header_;
155 159
156 // The security summary for the current page. 160 // The security summary for the current page.
157 base::string16 summary_text_; 161 base::string16 summary_text_;
158 162
159 // The separator between the header and the site settings view. 163 // The separator between the header and the site settings view.
160 views::Separator* separator_; 164 views::Separator* separator_;
161 165
162 // The view that contains the cookie and permissions sections. 166 // The view that contains the certificate, cookie, and permissions sections.
lgarron 2017/04/28 23:16:43 That means "site settings" is no longer accurate,
elawrence 2017/04/29 12:38:58 It arguably wasn't accurate before (cookies weren'
163 views::View* site_settings_view_; 167 views::View* site_settings_view_;
164 // The view that contains the contents of the "Cookies" part of the site 168
165 // settings view.
166 views::View* cookies_view_;
167 // The link that opens the "Cookies" dialog. 169 // The link that opens the "Cookies" dialog.
168 views::Link* cookie_dialog_link_; 170 views::Link* cookie_dialog_link_;
171
169 // The view that contains the "Permissions" table of the site settings view. 172 // The view that contains the "Permissions" table of the site settings view.
170 views::View* permissions_view_; 173 views::View* permissions_view_;
171 174
172 // The certificate provided by the site, if one exists. 175 // The certificate provided by the site, if one exists.
173 scoped_refptr<net::X509Certificate> certificate_; 176 scoped_refptr<net::X509Certificate> certificate_;
174 177
175 // These rows bundle together all the |View|s involved in a single row of the 178 // These rows bundle together all the |View|s involved in a single row of the
176 // permissions section, and keep those views updated when the underlying 179 // permissions section, and keep those views updated when the underlying
177 // |Permission| changes. 180 // |Permission| changes.
178 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; 181 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_;
179 182
180 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_; 183 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_;
181 184
182 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); 185 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView);
183 }; 186 };
184 187
185 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ 188 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698