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

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

Issue 2300353002: Revert of Make TrayDetailsView a ViewClickListener and ButtonListener (Closed)
Patch Set: Created 4 years, 3 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 WmShell::Get()->RecordUserMetricsAction( 346 WmShell::Get()->RecordUserMetricsAction(
347 key.third_party ? UMA_STATUS_AREA_VPN_ADD_THIRD_PARTY_CLICKED 347 key.third_party ? UMA_STATUS_AREA_VPN_ADD_THIRD_PARTY_CLICKED
348 : UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED); 348 : UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED);
349 WmShell::Get()->system_tray_delegate()->GetVPNDelegate()->ShowAddPage(key); 349 WmShell::Get()->system_tray_delegate()->GetVPNDelegate()->ShowAddPage(key);
350 return; 350 return;
351 } 351 }
352 352
353 // If the user clicked on a network entry, let the |delegate_| trigger a 353 // If the user clicked on a network entry, let the |delegate_| trigger a
354 // connection attempt (if the network is currently disconnected) or show a 354 // connection attempt (if the network is currently disconnected) or show a
355 // configuration dialog (if the network is currently connected or connecting). 355 // configuration dialog (if the network is currently connected or connecting).
356 delegate_->OnNetworkEntryClicked(sender); 356 delegate_->OnViewClicked(sender);
357 } 357 }
358 358
359 void VPNListView::AddNetwork(const chromeos::NetworkState* network) { 359 void VPNListView::AddNetwork(const chromeos::NetworkState* network) {
360 views::View* entry(new VPNListNetworkEntry(this, network)); 360 views::View* entry(new VPNListNetworkEntry(this, network));
361 container_->AddChildView(entry); 361 container_->AddChildView(entry);
362 network_view_service_path_map_[entry] = network->path(); 362 network_view_service_path_map_[entry] = network->path();
363 list_empty_ = false; 363 list_empty_ = false;
364 } 364 }
365 365
366 void VPNListView::AddProviderAndNetworks( 366 void VPNListView::AddProviderAndNetworks(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 } 411 }
412 412
413 // Add providers without any configured networks, in the order that the 413 // Add providers without any configured networks, in the order that the
414 // providers were returned by the extensions system. 414 // providers were returned by the extensions system.
415 for (const VPNProvider& provider : providers) 415 for (const VPNProvider& provider : providers)
416 AddProviderAndNetworks(provider.key, provider.name, networks); 416 AddProviderAndNetworks(provider.key, provider.name, networks);
417 } 417 }
418 418
419 } // namespace ash 419 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_sms.cc ('k') | ash/common/system/ime/tray_ime_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698