| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 } | 756 } |
| 757 if (network->type() == flimflam::kTypeWifi || | 757 if (network->type() == flimflam::kTypeWifi || |
| 758 network->type() == flimflam::kTypeWimax || | 758 network->type() == flimflam::kTypeWimax || |
| 759 network->type() == flimflam::kTypeVPN) { | 759 network->type() == flimflam::kTypeVPN) { |
| 760 // TODO(stevenjb): Replace with non-NetworkLibrary UI. | 760 // TODO(stevenjb): Replace with non-NetworkLibrary UI. |
| 761 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> | 761 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> |
| 762 FindNetworkByPath(network_id); | 762 FindNetworkByPath(network_id); |
| 763 NetworkConfigView::Show(cros_network, GetNativeWindow()); | 763 NetworkConfigView::Show(cros_network, GetNativeWindow()); |
| 764 return; | 764 return; |
| 765 } | 765 } |
| 766 if (network->type() == flimflam::kTypeCellular && | 766 if (network->type() == flimflam::kTypeCellular) { |
| 767 (network->activation_state() != flimflam::kActivationStateActivated || | 767 if (network->activation_state() != flimflam::kActivationStateActivated) |
| 768 network->cellular_out_of_credits())) { | 768 network_connect::ActivateCellular(network_id); |
| 769 ash::Shell::GetInstance()->delegate()->OpenMobileSetup(network_id); | 769 else if (network->cellular_out_of_credits()) |
| 770 network_connect::ShowMobileSetup(network_id); |
| 770 return; | 771 return; |
| 771 } | 772 } |
| 772 // No special configure or setup for |network_id|, show the settings UI. | 773 // No special configure or setup for |network_id|, show the settings UI. |
| 773 ShowNetworkSettings(network_id); | 774 ShowNetworkSettings(network_id); |
| 774 } | 775 } |
| 775 | 776 |
| 776 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { | 777 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { |
| 777 DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( | 778 DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( |
| 778 chromeos::switches::kUseNewNetworkConfigurationHandlers)); | 779 chromeos::switches::kUseNewNetworkConfigurationHandlers)); |
| 779 network_connect::ConnectResult result = | 780 network_connect::ConnectResult result = |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1340 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1340 }; | 1341 }; |
| 1341 | 1342 |
| 1342 } // namespace | 1343 } // namespace |
| 1343 | 1344 |
| 1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1345 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1345 return new chromeos::SystemTrayDelegate(); | 1346 return new chromeos::SystemTrayDelegate(); |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 } // namespace chromeos | 1349 } // namespace chromeos |
| OLD | NEW |