| Index: ash/system/cast/tray_cast.cc
|
| diff --git a/ash/system/cast/tray_cast.cc b/ash/system/cast/tray_cast.cc
|
| index 899b4d0c9a2adebc48eb915e2bcb464e3f5de1ee..70678868956a74cfdf529dad77b6a306f38f9419 100644
|
| --- a/ash/system/cast/tray_cast.cc
|
| +++ b/ash/system/cast/tray_cast.cc
|
| @@ -315,7 +315,6 @@ class CastDetailedView : public TrayDetailsView {
|
| void CreateItems();
|
|
|
| void UpdateReceiverListFromCachedData();
|
| - views::View* AddToReceiverList(const mojom::SinkAndRoutePtr& sink_route);
|
|
|
| // TrayDetailsView:
|
| void HandleViewClicked(views::View* view) override;
|
| @@ -388,7 +387,8 @@ void CastDetailedView::UpdateReceiverListFromCachedData() {
|
| // Add a view for each receiver.
|
| for (auto& it : sinks_and_routes_) {
|
| const ash::mojom::SinkAndRoutePtr& sink_route = it.second;
|
| - views::View* container = AddToReceiverList(sink_route);
|
| + const base::string16 name = base::UTF8ToUTF16(sink_route->sink->name);
|
| + views::View* container = AddScrollListItem(kSystemMenuCastDeviceIcon, name);
|
| view_to_sink_map_[container] = sink_route->sink.Clone();
|
| }
|
|
|
| @@ -396,18 +396,6 @@ void CastDetailedView::UpdateReceiverListFromCachedData() {
|
| scroller()->Layout();
|
| }
|
|
|
| -views::View* CastDetailedView::AddToReceiverList(
|
| - const ash::mojom::SinkAndRoutePtr& sink_route) {
|
| - const gfx::ImageSkia image =
|
| - gfx::CreateVectorIcon(kSystemMenuCastDeviceIcon, kMenuIconColor);
|
| -
|
| - HoverHighlightView* container = new HoverHighlightView(this);
|
| - container->AddIconAndLabel(image, base::UTF8ToUTF16(sink_route->sink->name));
|
| -
|
| - scroll_content()->AddChildView(container);
|
| - return container;
|
| -}
|
| -
|
| void CastDetailedView::HandleViewClicked(views::View* view) {
|
| // Find the receiver we are going to cast to.
|
| auto it = view_to_sink_map_.find(view);
|
|
|