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

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

Issue 2865533002: Reset HoverHighlightView state before re-populating (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | ash/system/network/vpn_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include "ash/public/cpp/config.h" 9 #include "ash/public/cpp/config.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 689 }
690 690
691 void NetworkListView::UpdateNetworkChild(int index, const NetworkInfo* info) { 691 void NetworkListView::UpdateNetworkChild(int index, const NetworkInfo* info) {
692 HoverHighlightView* network_view = nullptr; 692 HoverHighlightView* network_view = nullptr;
693 NetworkGuidMap::const_iterator found = network_guid_map_.find(info->guid); 693 NetworkGuidMap::const_iterator found = network_guid_map_.find(info->guid);
694 if (found == network_guid_map_.end()) { 694 if (found == network_guid_map_.end()) {
695 network_view = CreateViewForNetwork(*info); 695 network_view = CreateViewForNetwork(*info);
696 } else { 696 } else {
697 network_view = found->second; 697 network_view = found->second;
698 if (NeedUpdateViewForNetwork(*info)) { 698 if (NeedUpdateViewForNetwork(*info)) {
699 network_view->RemoveAllChildViews(true); 699 network_view->Reset();
700 UpdateViewForNetwork(network_view, *info); 700 UpdateViewForNetwork(network_view, *info);
701 network_view->Layout(); 701 network_view->Layout();
702 network_view->SchedulePaint(); 702 network_view->SchedulePaint();
703 } 703 }
704 } 704 }
705 PlaceViewAtIndex(network_view, index); 705 PlaceViewAtIndex(network_view, index);
706 if (info->disable) 706 if (info->disable)
707 network_view->SetEnabled(false); 707 network_view->SetEnabled(false);
708 network_map_[network_view] = info->guid; 708 network_map_[network_view] = info->guid;
709 network_guid_map_[info->guid] = network_view; 709 network_guid_map_[info->guid] = network_view;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DETAILED_VIEW_LABEL); 821 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DETAILED_VIEW_LABEL);
822 style.SetupLabel(label); 822 style.SetupLabel(label);
823 connection_warning->AddView(TriView::Container::CENTER, label); 823 connection_warning->AddView(TriView::Container::CENTER, label);
824 824
825 // Nothing to the right of the text. 825 // Nothing to the right of the text.
826 connection_warning->SetContainerVisible(TriView::Container::END, false); 826 connection_warning->SetContainerVisible(TriView::Container::END, false);
827 return connection_warning; 827 return connection_warning;
828 } 828 }
829 829
830 } // namespace ash 830 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/network/vpn_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698