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

Side by Side Diff: ash/common/system/chromeos/network/network_list_md.cc

Issue 2789253002: [Ash] Remove HoverHighlightView::hover() (Closed)
Patch Set: Created 3 years, 8 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/common/system/chromeos/network/network_list_md.h" 5 #include "ash/common/system/chromeos/network/network_list_md.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/common/system/chromeos/network/network_icon.h" 9 #include "ash/common/system/chromeos/network/network_icon.h"
10 #include "ash/common/system/chromeos/network/network_icon_animation.h" 10 #include "ash/common/system/chromeos/network/network_icon_animation.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 for (const auto& remove_iter : remove_guids) 460 for (const auto& remove_iter : remove_guids)
461 network_guid_map_.erase(remove_iter); 461 network_guid_map_.erase(remove_iter);
462 462
463 if (!needs_relayout_) 463 if (!needs_relayout_)
464 return; 464 return;
465 465
466 views::View* selected_view = nullptr; 466 views::View* selected_view = nullptr;
467 for (const auto& iter : network_guid_map_) { 467 for (const auto& iter : network_guid_map_) {
468 if (delegate_->IsViewHovered(iter.second)) { 468 if (iter.second->IsMouseHovered()) {
469 selected_view = iter.second; 469 selected_view = iter.second;
470 break; 470 break;
471 } 471 }
472 } 472 }
473 container()->SizeToPreferredSize(); 473 container()->SizeToPreferredSize();
474 delegate_->RelayoutScrollList(); 474 delegate_->RelayoutScrollList();
475 if (selected_view) 475 if (selected_view)
476 container()->ScrollRectToVisible(selected_view->bounds()); 476 container()->ScrollRectToVisible(selected_view->bounds());
477 } 477 }
478 478
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 if (found == last_network_info_map_.end()) { 674 if (found == last_network_info_map_.end()) {
675 // If we cannot find |info| in |last_network_info_map_|, just return true 675 // If we cannot find |info| in |last_network_info_map_|, just return true
676 // since this is a new network so we have nothing to compare. 676 // since this is a new network so we have nothing to compare.
677 return true; 677 return true;
678 } else { 678 } else {
679 return *found->second != info; 679 return *found->second != info;
680 } 680 }
681 } 681 }
682 682
683 } // namespace ash 683 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698