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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // disabling of mobile radio. The toggle will get re-enabled in the next | 124 // disabling of mobile radio. The toggle will get re-enabled in the next |
125 // call to NetworkListView::Update(). | 125 // call to NetworkListView::Update(). |
126 toggle_->SetEnabled(false); | 126 toggle_->SetEnabled(false); |
127 OnToggleToggled(toggle_->is_on()); | 127 OnToggleToggled(toggle_->is_on()); |
128 } | 128 } |
129 | 129 |
130 private: | 130 private: |
131 void InitializeLayout() { | 131 void InitializeLayout() { |
132 TrayPopupUtils::ConfigureAsStickyHeader(this); | 132 TrayPopupUtils::ConfigureAsStickyHeader(this); |
133 SetLayoutManager(new views::FillLayout); | 133 SetLayoutManager(new views::FillLayout); |
134 container_ = TrayPopupUtils::CreateSubHeaderRowView(); | 134 container_ = TrayPopupUtils::CreateSubHeaderRowView(true); |
135 AddChildView(container_); | 135 AddChildView(container_); |
136 | 136 |
137 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); | 137 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); |
138 style()->SetupLabel(label); | 138 style()->SetupLabel(label); |
139 label->SetText(l10n_util::GetStringUTF16(title_id_)); | 139 label->SetText(l10n_util::GetStringUTF16(title_id_)); |
140 container_->AddView(TriView::Container::CENTER, label); | 140 container_->AddView(TriView::Container::CENTER, label); |
141 } | 141 } |
142 | 142 |
143 void AddToggleButton(bool enabled) { | 143 void AddToggleButton(bool enabled) { |
144 toggle_ = TrayPopupUtils::CreateToggleButton(this, title_id_); | 144 toggle_ = TrayPopupUtils::CreateToggleButton(this, title_id_); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 if (found == last_network_info_map_.end()) { | 671 if (found == last_network_info_map_.end()) { |
672 // If we cannot find |info| in |last_network_info_map_|, just return true | 672 // If we cannot find |info| in |last_network_info_map_|, just return true |
673 // since this is a new network so we have nothing to compare. | 673 // since this is a new network so we have nothing to compare. |
674 return true; | 674 return true; |
675 } else { | 675 } else { |
676 return *found->second != info; | 676 return *found->second != info; |
677 } | 677 } |
678 } | 678 } |
679 | 679 |
680 } // namespace ash | 680 } // namespace ash |
OLD | NEW |