OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/network_screen.h" | 5 #include "chrome/browser/chromeos/login/network_screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // NetworkScreen, NetworkLibrary::NetworkManagerObserver implementation: | 64 // NetworkScreen, NetworkLibrary::NetworkManagerObserver implementation: |
65 | 65 |
66 void NetworkScreen::OnNetworkManagerChanged(NetworkLibrary* network_lib) { | 66 void NetworkScreen::OnNetworkManagerChanged(NetworkLibrary* network_lib) { |
67 UpdateStatus(network_lib); | 67 UpdateStatus(network_lib); |
68 } | 68 } |
69 | 69 |
70 //////////////////////////////////////////////////////////////////////////////// | 70 //////////////////////////////////////////////////////////////////////////////// |
71 // NetworkScreen, public: | 71 // NetworkScreen, public: |
72 | 72 |
73 void NetworkScreen::Refresh() { | 73 void NetworkScreen::Refresh() { |
74 if (CrosLibrary::Get()->EnsureLoaded()) { | 74 SubscribeNetworkNotification(); |
75 SubscribeNetworkNotification(); | 75 OnNetworkManagerChanged(chromeos::CrosLibrary::Get()->GetNetworkLibrary()); |
76 OnNetworkManagerChanged(chromeos::CrosLibrary::Get()->GetNetworkLibrary()); | |
77 } | |
78 } | 76 } |
79 | 77 |
80 /////////////////////////////////////////////////////////////////////////////// | 78 /////////////////////////////////////////////////////////////////////////////// |
81 // NetworkScreen, NetworkScreenActor::Delegate implementation: | 79 // NetworkScreen, NetworkScreenActor::Delegate implementation: |
82 | 80 |
83 void NetworkScreen::OnContinuePressed() { | 81 void NetworkScreen::OnContinuePressed() { |
84 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); | 82 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); |
85 if (network && network->Connected()) { | 83 if (network && network->Connected()) { |
86 NotifyOnConnection(); | 84 NotifyOnConnection(); |
87 } else { | 85 } else { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 &NetworkScreen::OnConnectionTimeout); | 171 &NetworkScreen::OnConnectionTimeout); |
174 } | 172 } |
175 | 173 |
176 network_id_ = network_id; | 174 network_id_ = network_id; |
177 actor_->ShowConnectingStatus(continue_pressed_, network_id_); | 175 actor_->ShowConnectingStatus(continue_pressed_, network_id_); |
178 | 176 |
179 actor_->EnableContinue(false); | 177 actor_->EnableContinue(false); |
180 } | 178 } |
181 | 179 |
182 } // namespace chromeos | 180 } // namespace chromeos |
OLD | NEW |