| 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_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); | 49 FOR_EACH_OBSERVER(Observer, observer_list_, OnLoginUIClosed(ui)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void LoginUIService::SyncConfirmationUIClosed(bool configure_sync_first) { | 52 void LoginUIService::SyncConfirmationUIClosed(bool configure_sync_first) { |
| 53 FOR_EACH_OBSERVER( | 53 FOR_EACH_OBSERVER( |
| 54 Observer, | 54 Observer, |
| 55 observer_list_, | 55 observer_list_, |
| 56 OnSyncConfirmationUIClosed(configure_sync_first)); | 56 OnSyncConfirmationUIClosed(configure_sync_first)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void LoginUIService::UntrustedLoginUIShown() { |
| 60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); |
| 61 } |
| 62 |
| 59 void LoginUIService::ShowLoginPopup() { | 63 void LoginUIService::ShowLoginPopup() { |
| 60 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
| 61 if (chrome::IsRunningInForcedAppMode()) | 65 if (chrome::IsRunningInForcedAppMode()) |
| 62 InlineLoginDialog::Show(profile_); | 66 InlineLoginDialog::Show(profile_); |
| 63 #else | 67 #else |
| 64 chrome::ScopedTabbedBrowserDisplayer displayer( | 68 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 65 profile_, chrome::GetActiveDesktop()); | 69 profile_, chrome::GetActiveDesktop()); |
| 66 chrome::ShowBrowserSignin(displayer.browser(), signin::SOURCE_APP_LAUNCHER); | 70 chrome::ShowBrowserSignin(displayer.browser(), signin::SOURCE_APP_LAUNCHER); |
| 67 #endif | 71 #endif |
| 68 } | 72 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 85 // TODO(rogerta): Separate out the bubble API so we don't have to pass | 89 // TODO(rogerta): Separate out the bubble API so we don't have to pass |
| 86 // ignored |email| and |callback| params. | 90 // ignored |email| and |callback| params. |
| 87 BrowserWindow::StartSyncCallback()); | 91 BrowserWindow::StartSyncCallback()); |
| 88 #endif | 92 #endif |
| 89 } | 93 } |
| 90 } | 94 } |
| 91 | 95 |
| 92 const base::string16& LoginUIService::GetLastLoginResult() { | 96 const base::string16& LoginUIService::GetLastLoginResult() { |
| 93 return last_login_result_; | 97 return last_login_result_; |
| 94 } | 98 } |
| OLD | NEW |