| OLD | NEW |
| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 gfx::ImageSkia image = | 200 gfx::ImageSkia image = |
| 201 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); | 201 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); |
| 202 base::string16 label = network_icon::GetLabelForNetwork( | 202 base::string16 label = network_icon::GetLabelForNetwork( |
| 203 network, network_icon::ICON_TYPE_MENU_LIST); | 203 network, network_icon::ICON_TYPE_MENU_LIST); |
| 204 if (network->IsConnectedState()) | 204 if (network->IsConnectedState()) |
| 205 SetupConnectedItem(label, image); | 205 SetupConnectedItem(label, image); |
| 206 else if (network->IsConnectingState()) | 206 else if (network->IsConnectingState()) |
| 207 SetupConnectingItem(label, image); | 207 SetupConnectingItem(label, image); |
| 208 else | 208 else |
| 209 AddIconAndLabel(image, label, false); | 209 AddIconAndLabel(image, label); |
| 210 | 210 |
| 211 if (network->IsConnectedState()) { | 211 if (network->IsConnectedState()) { |
| 212 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( | 212 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( |
| 213 this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT)); | 213 this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT)); |
| 214 tri_view()->AddView(TriView::Container::END, disconnect_button_); | 214 tri_view()->AddView(TriView::Container::END, disconnect_button_); |
| 215 tri_view()->SetContainerVisible(TriView::Container::END, true); | 215 tri_view()->SetContainerVisible(TriView::Container::END, true); |
| 216 tri_view()->SetContainerBorder( | 216 tri_view()->SetContainerBorder( |
| 217 TriView::Container::END, | 217 TriView::Container::END, |
| 218 views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin)); | 218 views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin)); |
| 219 } | 219 } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 // Add providers without any configured networks, in the order that the | 416 // Add providers without any configured networks, in the order that the |
| 417 // providers were returned by the extensions system. | 417 // providers were returned by the extensions system. |
| 418 for (const VPNProvider& provider : providers) | 418 for (const VPNProvider& provider : providers) |
| 419 AddProviderAndNetworks(provider, networks); | 419 AddProviderAndNetworks(provider, networks); |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace ash | 422 } // namespace ash |
| OLD | NEW |