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/login_screen.h" | 5 #include "chrome/browser/chromeos/login/login_screen.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 NewUserView* LoginScreen::AllocateView() { | 43 NewUserView* LoginScreen::AllocateView() { |
44 return new NewUserView(this, true); | 44 return new NewUserView(this, true); |
45 } | 45 } |
46 | 46 |
47 void LoginScreen::OnLogin(const std::string& username, | 47 void LoginScreen::OnLogin(const std::string& username, |
48 const std::string& password) { | 48 const std::string& password) { |
49 Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); | 49 Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); |
50 ChromeThread::PostTask( | 50 ChromeThread::PostTask( |
51 ChromeThread::FILE, FROM_HERE, | 51 ChromeThread::UI, FROM_HERE, |
52 NewRunnableMethod(authenticator_.get(), | 52 NewRunnableMethod(authenticator_.get(), |
53 &Authenticator::AuthenticateToLogin, | 53 &Authenticator::AuthenticateToLogin, |
54 profile, username, password)); | 54 profile, username, password)); |
55 } | 55 } |
56 | 56 |
57 void LoginScreen::OnLoginOffTheRecord() { | 57 void LoginScreen::OnLoginOffTheRecord() { |
58 ChromeThread::PostTask( | 58 ChromeThread::PostTask( |
59 ChromeThread::UI, FROM_HERE, | 59 ChromeThread::UI, FROM_HERE, |
60 NewRunnableMethod(authenticator_.get(), | 60 NewRunnableMethod(authenticator_.get(), |
61 &Authenticator::LoginOffTheRecord)); | 61 &Authenticator::LoginOffTheRecord)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bubble_ = MessageBubble::Show( | 107 bubble_ = MessageBubble::Show( |
108 view()->GetWidget(), | 108 view()->GetWidget(), |
109 view()->GetPasswordBounds(), | 109 view()->GetPasswordBounds(), |
110 BubbleBorder::LEFT_TOP, | 110 BubbleBorder::LEFT_TOP, |
111 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), | 111 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), |
112 error_text, | 112 error_text, |
113 this); | 113 this); |
114 } | 114 } |
115 | 115 |
116 } // namespace chromeos | 116 } // namespace chromeos |
OLD | NEW |