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 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" | 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const int kSiteDataSectionRowSpacing = 11; | 115 const int kSiteDataSectionRowSpacing = 11; |
116 | 116 |
117 } // namespace | 117 } // namespace |
118 | 118 |
119 // |PopupHeaderView| is the UI element (view) that represents the header of the | 119 // |PopupHeaderView| is the UI element (view) that represents the header of the |
120 // |WebsiteSettingsPopupView|. The header shows the status of the site's | 120 // |WebsiteSettingsPopupView|. The header shows the status of the site's |
121 // identity check and the name of the site's identity. | 121 // identity check and the name of the site's identity. |
122 class PopupHeaderView : public views::View { | 122 class PopupHeaderView : public views::View { |
123 public: | 123 public: |
124 explicit PopupHeaderView(views::ButtonListener* close_button_listener); | 124 explicit PopupHeaderView(views::ButtonListener* close_button_listener); |
125 virtual ~PopupHeaderView(); | 125 ~PopupHeaderView() override; |
126 | 126 |
127 // Sets the name of the site's identity. | 127 // Sets the name of the site's identity. |
128 void SetIdentityName(const base::string16& name); | 128 void SetIdentityName(const base::string16& name); |
129 | 129 |
130 // Sets the |status_text| for the identity check of this site and the | 130 // Sets the |status_text| for the identity check of this site and the |
131 // |text_color|. | 131 // |text_color|. |
132 void SetIdentityStatus(const base::string16& status_text, SkColor text_color); | 132 void SetIdentityStatus(const base::string16& status_text, SkColor text_color); |
133 | 133 |
134 private: | 134 private: |
135 // The label that displays the name of the site's identity. | 135 // The label that displays the name of the site's identity. |
136 views::Label* name_; | 136 views::Label* name_; |
137 // The label that displays the status of the identity check for this site. | 137 // The label that displays the status of the identity check for this site. |
138 views::Label* status_; | 138 views::Label* status_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(PopupHeaderView); | 140 DISALLOW_COPY_AND_ASSIGN(PopupHeaderView); |
141 }; | 141 }; |
142 | 142 |
143 // Website Settings are not supported for internal Chrome pages. Instead of the | 143 // Website Settings are not supported for internal Chrome pages. Instead of the |
144 // |WebsiteSettingsPopupView|, the |InternalPageInfoPopupView| is | 144 // |WebsiteSettingsPopupView|, the |InternalPageInfoPopupView| is |
145 // displayed. | 145 // displayed. |
146 class InternalPageInfoPopupView : public views::BubbleDelegateView { | 146 class InternalPageInfoPopupView : public views::BubbleDelegateView { |
147 public: | 147 public: |
148 explicit InternalPageInfoPopupView(views::View* anchor_view); | 148 explicit InternalPageInfoPopupView(views::View* anchor_view); |
149 virtual ~InternalPageInfoPopupView(); | 149 ~InternalPageInfoPopupView() override; |
150 | 150 |
151 // views::BubbleDelegateView: | 151 // views::BubbleDelegateView: |
152 virtual void OnWidgetDestroying(views::Widget* widget) override; | 152 void OnWidgetDestroying(views::Widget* widget) override; |
153 | 153 |
154 private: | 154 private: |
155 DISALLOW_COPY_AND_ASSIGN(InternalPageInfoPopupView); | 155 DISALLOW_COPY_AND_ASSIGN(InternalPageInfoPopupView); |
156 }; | 156 }; |
157 | 157 |
158 //////////////////////////////////////////////////////////////////////////////// | 158 //////////////////////////////////////////////////////////////////////////////// |
159 // Popup Header | 159 // Popup Header |
160 //////////////////////////////////////////////////////////////////////////////// | 160 //////////////////////////////////////////////////////////////////////////////// |
161 | 161 |
162 PopupHeaderView::PopupHeaderView(views::ButtonListener* close_button_listener) | 162 PopupHeaderView::PopupHeaderView(views::ButtonListener* close_button_listener) |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 807 |
808 if (reset_decisions_button) { | 808 if (reset_decisions_button) { |
809 content_layout->StartRow(1, 0); | 809 content_layout->StartRow(1, 0); |
810 content_layout->AddView(reset_decisions_button); | 810 content_layout->AddView(reset_decisions_button); |
811 } | 811 } |
812 | 812 |
813 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, | 813 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, |
814 views::GridLayout::LEADING); | 814 views::GridLayout::LEADING); |
815 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); | 815 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); |
816 } | 816 } |
OLD | NEW |