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

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

Issue 1722453002: Extend vpnProvider to allow reconnections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 4 years, 9 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 | chrome/test/data/extensions/api_test/vpn_provider/basic.js » ('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 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/system/chromeos/network/vpn_list_view.h" 5 #include "ash/system/chromeos/network/vpn_list_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/metrics/user_metrics_recorder.h" 10 #include "ash/metrics/user_metrics_recorder.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 RemoveAllChildViews(true); 205 RemoveAllChildViews(true);
206 disconnect_button_ = nullptr; 206 disconnect_button_ = nullptr;
207 207
208 AddIconAndLabel(ui::network_icon::GetImageForNetwork( 208 AddIconAndLabel(ui::network_icon::GetImageForNetwork(
209 network, ui::network_icon::ICON_TYPE_LIST), 209 network, ui::network_icon::ICON_TYPE_LIST),
210 ui::network_icon::GetLabelForNetwork( 210 ui::network_icon::GetLabelForNetwork(
211 network, ui::network_icon::ICON_TYPE_LIST), 211 network, ui::network_icon::ICON_TYPE_LIST),
212 IsConnectedOrConnecting(network)); 212 IsConnectedOrConnecting(network));
213 if (network->IsConnectedState()) { 213 if (IsConnectedOrConnecting(network)) {
214 disconnect_button_ = new DisconnectButton(this); 214 disconnect_button_ = new DisconnectButton(this);
215 AddChildView(disconnect_button_); 215 AddChildView(disconnect_button_);
216 SetBorder( 216 SetBorder(
217 views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 3)); 217 views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 3));
218 } else { 218 } else {
219 SetBorder( 219 SetBorder(
220 views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); 220 views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
221 } 221 }
222 222
223 // The icon and the disconnect button are always set to their preferred size. 223 // The icon and the disconnect button are always set to their preferred size.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 } 415 }
416 416
417 // Add providers without any configured networks, in the order that the 417 // Add providers without any configured networks, in the order that the
418 // providers were returned by the extensions system. 418 // providers were returned by the extensions system.
419 for (const VPNProvider& provider : providers) 419 for (const VPNProvider& provider : providers)
420 AddProviderAndNetworks(provider.key, provider.name, networks); 420 AddProviderAndNetworks(provider.key, provider.name, networks);
421 } 421 }
422 422
423 } // namespace ash 423 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/vpn_provider/basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698