| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 background_bounds_, | 67 background_bounds_, |
| 68 &background_view_); | 68 &background_view_); |
| 69 background_window_->Show(); | 69 background_window_->Show(); |
| 70 for (size_t i = 0; i < controllers_.size(); ++i) { | 70 for (size_t i = 0; i < controllers_.size(); ++i) { |
| 71 (controllers_[i])->Init(static_cast<int>(i), | 71 (controllers_[i])->Init(static_cast<int>(i), |
| 72 static_cast<int>(controllers_.size())); | 72 static_cast<int>(controllers_.size())); |
| 73 } | 73 } |
| 74 | 74 |
| 75 WmMessageListener::instance()->AddObserver(this); | 75 WmMessageListener::instance()->AddObserver(this); |
| 76 | 76 |
| 77 if (CrosLibrary::EnsureLoaded()) | 77 if (CrosLibrary::Get()->EnsureLoaded()) |
| 78 LoginLibrary::Get()->EmitLoginPromptReady(); | 78 CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 ExistingUserController::~ExistingUserController() { | 81 ExistingUserController::~ExistingUserController() { |
| 82 if (background_window_) | 82 if (background_window_) |
| 83 background_window_->Close(); | 83 background_window_->Close(); |
| 84 | 84 |
| 85 WmMessageListener::instance()->RemoveObserver(this); | 85 WmMessageListener::instance()->RemoveObserver(this); |
| 86 | 86 |
| 87 STLDeleteElements(&controllers_); | 87 STLDeleteElements(&controllers_); |
| 88 } | 88 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 background_window_->Close(); | 152 background_window_->Close(); |
| 153 | 153 |
| 154 chromeos::login_utils::CompleteLogin(username, cookies); | 154 chromeos::login_utils::CompleteLogin(username, cookies); |
| 155 | 155 |
| 156 // Delay deletion as we're on the stack. | 156 // Delay deletion as we're on the stack. |
| 157 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 157 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace chromeos | 160 } // namespace chromeos |
| OLD | NEW |