OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/system/network/network_list.h" | 5 #include "ash/system/network/network_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/strings/grit/ash_strings.h" | 9 #include "ash/strings/grit/ash_strings.h" |
10 #include "ash/system/network/network_icon.h" | 10 #include "ash/system/network/network_icon.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // disabling of mobile radio. The toggle will get re-enabled in the next | 128 // disabling of mobile radio. The toggle will get re-enabled in the next |
129 // call to NetworkListView::Update(). | 129 // call to NetworkListView::Update(). |
130 toggle_->SetEnabled(false); | 130 toggle_->SetEnabled(false); |
131 OnToggleToggled(toggle_->is_on()); | 131 OnToggleToggled(toggle_->is_on()); |
132 } | 132 } |
133 | 133 |
134 private: | 134 private: |
135 void InitializeLayout() { | 135 void InitializeLayout() { |
136 TrayPopupUtils::ConfigureAsStickyHeader(this); | 136 TrayPopupUtils::ConfigureAsStickyHeader(this); |
137 SetLayoutManager(new views::FillLayout); | 137 SetLayoutManager(new views::FillLayout); |
138 container_ = TrayPopupUtils::CreateSubHeaderRowView(); | 138 container_ = TrayPopupUtils::CreateSubHeaderRowView(false); |
139 AddChildView(container_); | 139 AddChildView(container_); |
140 | 140 |
141 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); | 141 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); |
142 style()->SetupLabel(label); | 142 style()->SetupLabel(label); |
143 label->SetText(l10n_util::GetStringUTF16(title_id_)); | 143 label->SetText(l10n_util::GetStringUTF16(title_id_)); |
144 container_->AddView(TriView::Container::CENTER, label); | 144 container_->AddView(TriView::Container::CENTER, label); |
145 } | 145 } |
146 | 146 |
147 void AddToggleButton(bool enabled) { | 147 void AddToggleButton(bool enabled) { |
148 toggle_ = TrayPopupUtils::CreateToggleButton(this, title_id_); | 148 toggle_ = TrayPopupUtils::CreateToggleButton(this, title_id_); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DETAILED_VIEW_LABEL); | 722 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DETAILED_VIEW_LABEL); |
723 style.SetupLabel(label); | 723 style.SetupLabel(label); |
724 connection_warning->AddView(TriView::Container::CENTER, label); | 724 connection_warning->AddView(TriView::Container::CENTER, label); |
725 | 725 |
726 // Nothing to the right of the text. | 726 // Nothing to the right of the text. |
727 connection_warning->SetContainerVisible(TriView::Container::END, false); | 727 connection_warning->SetContainerVisible(TriView::Container::END, false); |
728 return connection_warning; | 728 return connection_warning; |
729 } | 729 } |
730 | 730 |
731 } // namespace ash | 731 } // namespace ash |
OLD | NEW |