Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: ash/system/network/network_list.cc

Issue 2957043002: Add a row in the network tray to inform users to turn Bluetooth on to enable Tether. (Closed)
Patch Set: added actions and slightly refactored the infolabel class Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if (info_label) { 649 if (info_label) {
650 needs_relayout_ = true; 650 needs_relayout_ = true;
651 delete info_label; 651 delete info_label;
652 *info_label_ptr = nullptr; 652 *info_label_ptr = nullptr;
653 } 653 }
654 return; 654 return;
655 } 655 }
656 if (!info_label) 656 if (!info_label)
657 info_label = new InfoLabel(message_id); 657 info_label = new InfoLabel(message_id);
658 else 658 else
659 info_label->SetMessage(message_id); 659 info_label->Update(message_id);
660 PlaceViewAtIndex(info_label, insertion_index); 660 PlaceViewAtIndex(info_label, insertion_index);
661 *info_label_ptr = info_label; 661 *info_label_ptr = info_label;
662 } 662 }
663 663
664 int NetworkListView::UpdateSectionHeaderRow(NetworkTypePattern pattern, 664 int NetworkListView::UpdateSectionHeaderRow(NetworkTypePattern pattern,
665 bool enabled, 665 bool enabled,
666 int child_index, 666 int child_index,
667 SectionHeaderRowView** view, 667 SectionHeaderRowView** view,
668 views::Separator** separator_view) { 668 views::Separator** separator_view) {
669 if (!*view) { 669 if (!*view) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 TriView::Container::CENTER, views::CreateEmptyBorder(gfx::Insets( 733 TriView::Container::CENTER, views::CreateEmptyBorder(gfx::Insets(
734 0, 0, 0, kTrayPopupLabelRightPadding))); 734 0, 0, 0, kTrayPopupLabelRightPadding)));
735 735
736 // Nothing to the right of the text. 736 // Nothing to the right of the text.
737 connection_warning->SetContainerVisible(TriView::Container::END, false); 737 connection_warning->SetContainerVisible(TriView::Container::END, false);
738 return connection_warning; 738 return connection_warning;
739 } 739 }
740 740
741 } // namespace tray 741 } // namespace tray
742 } // namespace ash 742 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698