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_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" |
19 #include "ui/views/controls/button/button.h" | 20 #include "ui/views/controls/button/button.h" |
20 #include "ui/views/controls/link_listener.h" | 21 #include "ui/views/controls/link_listener.h" |
21 #include "ui/views/controls/separator.h" | 22 #include "ui/views/controls/separator.h" |
22 #include "ui/views/controls/styled_label_listener.h" | 23 #include "ui/views/controls/styled_label_listener.h" |
23 | 24 |
24 class GURL; | 25 class GURL; |
25 class BubbleHeaderView; | 26 class BubbleHeaderView; |
| 27 class InspectLinkView; |
26 class Profile; | 28 class Profile; |
27 | 29 |
28 namespace content { | 30 namespace content { |
29 class WebContents; | 31 class WebContents; |
30 } | 32 } |
31 | 33 |
32 namespace net { | 34 namespace net { |
33 class X509Certificate; | 35 class X509Certificate; |
34 } | 36 } |
35 | 37 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 137 |
136 // Creates the contents of the |site_settings_view_|. The ownership of the | 138 // Creates the contents of the |site_settings_view_|. The ownership of the |
137 // returned view is transferred to the caller. | 139 // returned view is transferred to the caller. |
138 views::View* CreateSiteSettingsView(int side_margin) WARN_UNUSED_RESULT; | 140 views::View* CreateSiteSettingsView(int side_margin) WARN_UNUSED_RESULT; |
139 | 141 |
140 // Used to asynchronously handle clicks since these calls may cause the | 142 // 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 | 143 // destruction of the settings view and the base class window still needs to |
142 // be alive to finish handling the mouse or keyboard click. | 144 // be alive to finish handling the mouse or keyboard click. |
143 void HandleLinkClickedAsync(views::Link* source); | 145 void HandleLinkClickedAsync(views::Link* source); |
144 | 146 |
145 // Whether DevTools is disabled for the relevant profile. | |
146 bool is_devtools_disabled_; | |
147 | |
148 // The presenter that controls the Page Info UI. | 147 // The presenter that controls the Page Info UI. |
149 std::unique_ptr<PageInfo> presenter_; | 148 std::unique_ptr<PageInfo> presenter_; |
150 | 149 |
151 Profile* profile_; | 150 Profile* profile_; |
152 | 151 |
153 // The header section (containing security-related information). | 152 // The header section (containing security-related information). |
154 BubbleHeaderView* header_; | 153 BubbleHeaderView* header_; |
155 | 154 |
156 // The security summary for the current page. | 155 // The security summary for the current page. |
157 base::string16 summary_text_; | 156 base::string16 summary_text_; |
158 | 157 |
159 // The separator between the header and the site settings view. | 158 // The separator between the header and the site settings view. |
160 views::Separator* separator_; | 159 views::Separator* separator_; |
161 | 160 |
162 // The view that contains the cookie and permissions sections. | 161 // The view that contains the certificate, cookie, and permissions sections. |
163 views::View* site_settings_view_; | 162 views::View* site_settings_view_; |
| 163 |
| 164 // The view that contains the contents of the "Certificate" part of the site |
| 165 // settings view. |
| 166 InspectLinkView* certificate_view_; |
| 167 |
164 // The view that contains the contents of the "Cookies" part of the site | 168 // The view that contains the contents of the "Cookies" part of the site |
165 // settings view. | 169 // settings view. |
166 views::View* cookies_view_; | 170 InspectLinkView* cookies_view_; |
167 // The link that opens the "Cookies" dialog. | 171 |
168 views::Link* cookie_dialog_link_; | |
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_ |
OLD | NEW |