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

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

Issue 2696033003: [Ash MD] Remove some non-MD code from HoverHighlightView (Closed)
Patch Set: Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/vpn_list_view.h" 5 #include "ash/common/system/chromeos/network/vpn_list_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 gfx::ImageSkia image = 210 gfx::ImageSkia image =
211 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); 211 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST);
212 base::string16 label = network_icon::GetLabelForNetwork( 212 base::string16 label = network_icon::GetLabelForNetwork(
213 network, UseMd() ? network_icon::ICON_TYPE_MENU_LIST 213 network, UseMd() ? network_icon::ICON_TYPE_MENU_LIST
214 : network_icon::ICON_TYPE_LIST); 214 : network_icon::ICON_TYPE_LIST);
215 if (network->IsConnectedState()) 215 if (network->IsConnectedState())
216 SetupConnectedItemMd(label, image); 216 SetupConnectedItemMd(label, image);
217 else if (network->IsConnectingState()) 217 else if (network->IsConnectingState())
218 SetupConnectingItemMd(label, image); 218 SetupConnectingItemMd(label, image);
219 else 219 else
220 AddIconAndLabel(image, label, false); 220 AddIconAndLabel(image, label);
221 221
222 if (network->IsConnectedState()) { 222 if (network->IsConnectedState()) {
223 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( 223 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton(
224 this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT)); 224 this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT));
225 tri_view()->AddView(TriView::Container::END, disconnect_button_); 225 tri_view()->AddView(TriView::Container::END, disconnect_button_);
226 tri_view()->SetContainerVisible(TriView::Container::END, true); 226 tri_view()->SetContainerVisible(TriView::Container::END, true);
227 tri_view()->SetContainerBorder( 227 tri_view()->SetContainerBorder(
228 TriView::Container::END, 228 TriView::Container::END,
229 views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin)); 229 views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin));
230 } 230 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 432 }
433 } 433 }
434 434
435 // Add providers without any configured networks, in the order that the 435 // Add providers without any configured networks, in the order that the
436 // providers were returned by the extensions system. 436 // providers were returned by the extensions system.
437 for (const VPNProvider& provider : providers) 437 for (const VPNProvider& provider : providers)
438 AddProviderAndNetworks(provider, networks); 438 AddProviderAndNetworks(provider, networks);
439 } 439 }
440 440
441 } // namespace ash 441 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698