OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/system/network_selector.h" | 5 #include "athena/system/network_selector.h" |
6 | 6 |
7 #include "athena/screen/public/screen_manager.h" | 7 #include "athena/screen/public/screen_manager.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chromeos/network/network_configuration_handler.h" | 10 #include "chromeos/network/network_configuration_handler.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 void ShowPasswordView(const std::string& service_path) { | 237 void ShowPasswordView(const std::string& service_path) { |
238 const NetworkState* network = | 238 const NetworkState* network = |
239 NetworkHandler::Get()->network_state_handler()->GetNetworkState( | 239 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
240 service_path); | 240 service_path); |
241 if (!network) | 241 if (!network) |
242 return; | 242 return; |
243 | 243 |
244 // If this is not a wifi network that needs a password, then ignore. | 244 // If this is not a wifi network that needs a password, then ignore. |
245 if (network->type() != shill::kTypeWifi || | 245 if (network->type() != shill::kTypeWifi || |
246 network->security() == shill::kSecurityNone) { | 246 network->security_class() == shill::kSecurityNone) { |
247 return; | 247 return; |
248 } | 248 } |
249 | 249 |
250 password_view_.reset(new PasswordView( | 250 password_view_.reset(new PasswordView( |
251 network_, | 251 network_, |
252 base::Bind(&NetworkRow::OnPasswordComplete, weak_ptr_.GetWeakPtr()))); | 252 base::Bind(&NetworkRow::OnPasswordComplete, weak_ptr_.GetWeakPtr()))); |
253 password_view_->set_owned_by_client(); | 253 password_view_->set_owned_by_client(); |
254 AddChildView(password_view_.get()); | 254 AddChildView(password_view_.get()); |
255 PreferredSizeChanged(); | 255 PreferredSizeChanged(); |
256 GetWidget()->GetRootView()->Layout(); | 256 GetWidget()->GetRootView()->Layout(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 } // namespace | 428 } // namespace |
429 | 429 |
430 namespace athena { | 430 namespace athena { |
431 | 431 |
432 void CreateNetworkSelector() { | 432 void CreateNetworkSelector() { |
433 new NetworkSelector(); | 433 new NetworkSelector(); |
434 } | 434 } |
435 | 435 |
436 } // namespace athena | 436 } // namespace athena |
OLD | NEW |