| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 last_network_state_(NetworkStateInformer::UNKNOWN), | 313 last_network_state_(NetworkStateInformer::UNKNOWN), |
| 314 has_pending_auth_ui_(false), | 314 has_pending_auth_ui_(false), |
| 315 caps_lock_enabled_(false), | 315 caps_lock_enabled_(false), |
| 316 gaia_screen_handler_(gaia_screen_handler) { | 316 gaia_screen_handler_(gaia_screen_handler) { |
| 317 DCHECK(network_state_informer_.get()); | 317 DCHECK(network_state_informer_.get()); |
| 318 DCHECK(error_screen_actor_); | 318 DCHECK(error_screen_actor_); |
| 319 DCHECK(core_oobe_actor_); | 319 DCHECK(core_oobe_actor_); |
| 320 DCHECK(gaia_screen_handler_); | 320 DCHECK(gaia_screen_handler_); |
| 321 gaia_screen_handler_->SetSigninScreenHandler(this); | 321 gaia_screen_handler_->SetSigninScreenHandler(this); |
| 322 network_state_informer_->AddObserver(this); | 322 network_state_informer_->AddObserver(this); |
| 323 allow_new_user_subscription_ = CrosSettings::Get()->AddSettingsObserver( | |
| 324 kAccountsPrefAllowNewUser, | |
| 325 base::Bind(&SigninScreenHandler::UserSettingsChanged, | |
| 326 base::Unretained(this))); | |
| 327 allow_guest_subscription_ = CrosSettings::Get()->AddSettingsObserver( | |
| 328 kAccountsPrefAllowGuest, | |
| 329 base::Bind(&SigninScreenHandler::UserSettingsChanged, | |
| 330 base::Unretained(this))); | |
| 331 | 323 |
| 332 registrar_.Add(this, | 324 registrar_.Add(this, |
| 333 chrome::NOTIFICATION_AUTH_NEEDED, | 325 chrome::NOTIFICATION_AUTH_NEEDED, |
| 334 content::NotificationService::AllSources()); | 326 content::NotificationService::AllSources()); |
| 335 registrar_.Add(this, | 327 registrar_.Add(this, |
| 336 chrome::NOTIFICATION_AUTH_SUPPLIED, | 328 chrome::NOTIFICATION_AUTH_SUPPLIED, |
| 337 content::NotificationService::AllSources()); | 329 content::NotificationService::AllSources()); |
| 338 registrar_.Add(this, | 330 registrar_.Add(this, |
| 339 chrome::NOTIFICATION_AUTH_CANCELLED, | 331 chrome::NOTIFICATION_AUTH_CANCELLED, |
| 340 content::NotificationService::AllSources()); | 332 content::NotificationService::AllSources()); |
| (...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 DCHECK(gaia_screen_handler_); | 1783 DCHECK(gaia_screen_handler_); |
| 1792 return gaia_screen_handler_->frame_state(); | 1784 return gaia_screen_handler_->frame_state(); |
| 1793 } | 1785 } |
| 1794 | 1786 |
| 1795 net::Error SigninScreenHandler::FrameError() const { | 1787 net::Error SigninScreenHandler::FrameError() const { |
| 1796 DCHECK(gaia_screen_handler_); | 1788 DCHECK(gaia_screen_handler_); |
| 1797 return gaia_screen_handler_->frame_error(); | 1789 return gaia_screen_handler_->frame_error(); |
| 1798 } | 1790 } |
| 1799 | 1791 |
| 1800 } // namespace chromeos | 1792 } // namespace chromeos |
| OLD | NEW |