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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
634 InfoLabel* info_label = *info_label_ptr; | 634 InfoLabel* info_label = *info_label_ptr; |
635 if (!message_id) { | 635 if (!message_id) { |
636 if (info_label) { | 636 if (info_label) { |
637 needs_relayout_ = true; | 637 needs_relayout_ = true; |
638 delete info_label; | 638 delete info_label; |
639 *info_label_ptr = nullptr; | 639 *info_label_ptr = nullptr; |
640 } | 640 } |
641 return; | 641 return; |
642 } | 642 } |
643 if (!info_label) | 643 if (!info_label) |
644 info_label = new InfoLabel(message_id); | 644 info_label = TrayDetailsView::CreateInfoLabel( |
Kyle Horimoto
2017/07/07 17:33:59
This will only create an info label of a given typ
tdanderson
2017/07/07 21:25:11
+1, and IMO this is the most awkward part to deal
Kyle Horimoto
2017/07/07 21:39:25
This plan sounds great to me! Leslie, let me know
lesliewatkins
2017/07/09 00:57:47
I hopefully did some variation of this, but again,
| |
645 message_id); // new InfoLabel(message_id); | |
Kyle Horimoto
2017/07/07 17:33:59
Remove comment, make into a single line of code.
lesliewatkins
2017/07/09 00:57:47
Done.
| |
645 else | 646 else |
646 info_label->SetMessage(message_id); | 647 info_label->SetMessage(message_id); |
648 | |
647 PlaceViewAtIndex(info_label, insertion_index); | 649 PlaceViewAtIndex(info_label, insertion_index); |
648 *info_label_ptr = info_label; | 650 *info_label_ptr = info_label; |
649 } | 651 } |
650 | 652 |
651 int NetworkListView::UpdateSectionHeaderRow(NetworkTypePattern pattern, | 653 int NetworkListView::UpdateSectionHeaderRow(NetworkTypePattern pattern, |
652 bool enabled, | 654 bool enabled, |
653 int child_index, | 655 int child_index, |
654 SectionHeaderRowView** view, | 656 SectionHeaderRowView** view, |
655 views::Separator** separator_view) { | 657 views::Separator** separator_view) { |
656 if (!*view) { | 658 if (!*view) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
720 TriView::Container::CENTER, views::CreateEmptyBorder(gfx::Insets( | 722 TriView::Container::CENTER, views::CreateEmptyBorder(gfx::Insets( |
721 0, 0, 0, kTrayPopupLabelRightPadding))); | 723 0, 0, 0, kTrayPopupLabelRightPadding))); |
722 | 724 |
723 // Nothing to the right of the text. | 725 // Nothing to the right of the text. |
724 connection_warning->SetContainerVisible(TriView::Container::END, false); | 726 connection_warning->SetContainerVisible(TriView::Container::END, false); |
725 return connection_warning; | 727 return connection_warning; |
726 } | 728 } |
727 | 729 |
728 } // namespace tray | 730 } // namespace tray |
729 } // namespace ash | 731 } // namespace ash |
OLD | NEW |