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/ui/webui/signin/login_ui_service.h" | 5 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/signin/signin_promo.h" | 8 #include "chrome/browser/signin/signin_promo.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); | 60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); |
61 } | 61 } |
62 | 62 |
63 void LoginUIService::ShowLoginPopup() { | 63 void LoginUIService::ShowLoginPopup() { |
64 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
65 if (chrome::IsRunningInForcedAppMode()) | 65 if (chrome::IsRunningInForcedAppMode()) |
66 InlineLoginDialog::Show(profile_); | 66 InlineLoginDialog::Show(profile_); |
67 #else | 67 #else |
68 chrome::ScopedTabbedBrowserDisplayer displayer( | 68 chrome::ScopedTabbedBrowserDisplayer displayer( |
69 profile_, chrome::GetActiveDesktop()); | 69 profile_, chrome::GetActiveDesktop()); |
70 chrome::ShowBrowserSignin( | 70 chrome::ShowBrowserSignin(displayer.browser(), |
71 displayer.browser(), signin_metrics::SOURCE_APP_LAUNCHER); | 71 signin_metrics::ACCESS_POINT_EXTENSIONS); |
72 #endif | 72 #endif |
73 } | 73 } |
74 | 74 |
75 void LoginUIService::DisplayLoginResult(Browser* browser, | 75 void LoginUIService::DisplayLoginResult(Browser* browser, |
76 const base::string16& message) { | 76 const base::string16& message) { |
77 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
78 // ChromeOS doesn't have the avatar bubble so it never calls this function. | 78 // ChromeOS doesn't have the avatar bubble so it never calls this function. |
79 NOTREACHED(); | 79 NOTREACHED(); |
80 #endif | 80 #endif |
81 last_login_result_ = message; | 81 last_login_result_ = message; |
82 browser->window()->ShowAvatarBubbleFromAvatarButton( | 82 browser->window()->ShowAvatarBubbleFromAvatarButton( |
83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : | 83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN |
84 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, | 84 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, |
85 signin::ManageAccountsParams()); | 85 signin::ManageAccountsParams(), signin_metrics::ACCESS_POINT_EXTENSIONS); |
86 } | 86 } |
87 | 87 |
88 const base::string16& LoginUIService::GetLastLoginResult() { | 88 const base::string16& LoginUIService::GetLastLoginResult() { |
89 return last_login_result_; | 89 return last_login_result_; |
90 } | 90 } |
OLD | NEW |