| 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/login/screens/network_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/network_screen.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 view_->Unbind(); | 72 view_->Unbind(); |
| 73 connection_timer_.Stop(); | 73 connection_timer_.Stop(); |
| 74 UnsubscribeNetworkNotification(); | 74 UnsubscribeNetworkNotification(); |
| 75 | 75 |
| 76 input_method::InputMethodManager::Get()->RemoveObserver(this); | 76 input_method::InputMethodManager::Get()->RemoveObserver(this); |
| 77 } | 77 } |
| 78 | 78 |
| 79 //////////////////////////////////////////////////////////////////////////////// | 79 //////////////////////////////////////////////////////////////////////////////// |
| 80 // NetworkScreen, NetworkModel implementation: | 80 // NetworkScreen, NetworkModel implementation: |
| 81 | 81 |
| 82 void NetworkScreen::PrepareToShow() { | |
| 83 if (view_) | |
| 84 view_->PrepareToShow(); | |
| 85 } | |
| 86 | |
| 87 void NetworkScreen::Show() { | 82 void NetworkScreen::Show() { |
| 88 Refresh(); | 83 Refresh(); |
| 89 | 84 |
| 90 // Here we should handle default locales, for which we do not have UI | 85 // Here we should handle default locales, for which we do not have UI |
| 91 // resources. This would load fallback, but properly show "selected" locale | 86 // resources. This would load fallback, but properly show "selected" locale |
| 92 // in the UI. | 87 // in the UI. |
| 93 if (selected_language_code_.empty()) { | 88 if (selected_language_code_.empty()) { |
| 94 const StartupCustomizationDocument* startup_manifest = | 89 const StartupCustomizationDocument* startup_manifest = |
| 95 StartupCustomizationDocument::GetInstance(); | 90 StartupCustomizationDocument::GetInstance(); |
| 96 SetApplicationLocale(startup_manifest->initial_locale_default()); | 91 SetApplicationLocale(startup_manifest->initial_locale_default()); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 observer.OnLanguageListReloaded(); | 444 observer.OnLanguageListReloaded(); |
| 450 } | 445 } |
| 451 | 446 |
| 452 void NetworkScreen::OnSystemTimezoneChanged() { | 447 void NetworkScreen::OnSystemTimezoneChanged() { |
| 453 std::string current_timezone_id; | 448 std::string current_timezone_id; |
| 454 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); | 449 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); |
| 455 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); | 450 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); |
| 456 } | 451 } |
| 457 | 452 |
| 458 } // namespace chromeos | 453 } // namespace chromeos |
| OLD | NEW |