OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/webui/chromeos/login/multicast_core_oobe_view.h" |
| 6 |
| 7 namespace chromeos { |
| 8 |
| 9 MulticastCoreOobeView::MulticastCoreOobeView() = default; |
| 10 |
| 11 MulticastCoreOobeView::~MulticastCoreOobeView() = default; |
| 12 |
| 13 void MulticastCoreOobeView::AddView(CoreOobeView* view) { |
| 14 views_.push_back(view); |
| 15 } |
| 16 |
| 17 void MulticastCoreOobeView::SetDelegate(Delegate* delegate) { |
| 18 // Either delegate_ or delegate must be null. It is a usage error to update |
| 19 // delegate_ to a different value while it already has a value. |
| 20 DCHECK(!delegate_ || !delegate); |
| 21 |
| 22 delegate_ = delegate; |
| 23 |
| 24 for (CoreOobeView* view : views_) |
| 25 view->SetDelegate(delegate); |
| 26 } |
| 27 |
| 28 void MulticastCoreOobeView::Show(OobeScreen screen) { |
| 29 for (CoreOobeView* view : views_) |
| 30 view->Show(screen); |
| 31 } |
| 32 |
| 33 void MulticastCoreOobeView::Hide(OobeScreen screen) { |
| 34 for (CoreOobeView* view : views_) |
| 35 view->Hide(screen); |
| 36 } |
| 37 |
| 38 void MulticastCoreOobeView::ShowSignInError( |
| 39 int login_attempts, |
| 40 const std::string& error_text, |
| 41 const std::string& help_link_text, |
| 42 HelpAppLauncher::HelpTopic help_topic_id) { |
| 43 for (CoreOobeView* view : views_) |
| 44 view->ShowSignInError(login_attempts, error_text, help_link_text, |
| 45 help_topic_id); |
| 46 } |
| 47 |
| 48 void MulticastCoreOobeView::ShowTpmError() { |
| 49 for (CoreOobeView* view : views_) |
| 50 view->ShowTpmError(); |
| 51 } |
| 52 |
| 53 void MulticastCoreOobeView::ShowSignInUI(const std::string& email) { |
| 54 for (CoreOobeView* view : views_) |
| 55 view->ShowSignInUI(email); |
| 56 } |
| 57 |
| 58 void MulticastCoreOobeView::ResetSignInUI(bool force_online) { |
| 59 for (CoreOobeView* view : views_) |
| 60 view->ResetSignInUI(force_online); |
| 61 } |
| 62 |
| 63 void MulticastCoreOobeView::ClearUserPodPassword() { |
| 64 for (CoreOobeView* view : views_) |
| 65 view->ClearUserPodPassword(); |
| 66 } |
| 67 |
| 68 void MulticastCoreOobeView::RefocusCurrentPod() { |
| 69 for (CoreOobeView* view : views_) |
| 70 view->RefocusCurrentPod(); |
| 71 } |
| 72 |
| 73 void MulticastCoreOobeView::ShowPasswordChangedScreen( |
| 74 bool show_password_error, |
| 75 const std::string& email) { |
| 76 for (CoreOobeView* view : views_) |
| 77 view->ShowPasswordChangedScreen(show_password_error, email); |
| 78 } |
| 79 |
| 80 void MulticastCoreOobeView::SetUsageStats(bool checked) { |
| 81 for (CoreOobeView* view : views_) |
| 82 view->SetUsageStats(checked); |
| 83 } |
| 84 |
| 85 void MulticastCoreOobeView::SetOemEulaUrl(const std::string& oem_eula_url) { |
| 86 for (CoreOobeView* view : views_) |
| 87 view->SetOemEulaUrl(oem_eula_url); |
| 88 } |
| 89 |
| 90 void MulticastCoreOobeView::SetTpmPassword(const std::string& tpm_password) { |
| 91 for (CoreOobeView* view : views_) |
| 92 view->SetTpmPassword(tpm_password); |
| 93 } |
| 94 |
| 95 void MulticastCoreOobeView::ClearErrors() { |
| 96 for (CoreOobeView* view : views_) |
| 97 view->ClearErrors(); |
| 98 } |
| 99 |
| 100 void MulticastCoreOobeView::ReloadContent( |
| 101 const base::DictionaryValue& dictionary) { |
| 102 for (CoreOobeView* view : views_) |
| 103 view->ReloadContent(dictionary); |
| 104 } |
| 105 |
| 106 void MulticastCoreOobeView::ShowControlBar(bool show) { |
| 107 for (CoreOobeView* view : views_) |
| 108 view->ShowControlBar(show); |
| 109 } |
| 110 |
| 111 void MulticastCoreOobeView::ShowPinKeyboard(bool show) { |
| 112 for (CoreOobeView* view : views_) |
| 113 view->ShowPinKeyboard(show); |
| 114 } |
| 115 |
| 116 void MulticastCoreOobeView::SetClientAreaSize(int width, int height) { |
| 117 for (CoreOobeView* view : views_) |
| 118 view->SetClientAreaSize(width, height); |
| 119 } |
| 120 |
| 121 void MulticastCoreOobeView::ShowDeviceResetScreen() { |
| 122 for (CoreOobeView* view : views_) |
| 123 view->ShowDeviceResetScreen(); |
| 124 } |
| 125 |
| 126 void MulticastCoreOobeView::ShowEnableDebuggingScreen() { |
| 127 for (CoreOobeView* view : views_) |
| 128 view->ShowEnableDebuggingScreen(); |
| 129 } |
| 130 |
| 131 void MulticastCoreOobeView::InitDemoModeDetection() { |
| 132 for (CoreOobeView* view : views_) |
| 133 view->InitDemoModeDetection(); |
| 134 } |
| 135 |
| 136 void MulticastCoreOobeView::StopDemoModeDetection() { |
| 137 for (CoreOobeView* view : views_) |
| 138 view->StopDemoModeDetection(); |
| 139 } |
| 140 |
| 141 void MulticastCoreOobeView::UpdateKeyboardState() { |
| 142 for (CoreOobeView* view : views_) |
| 143 view->UpdateKeyboardState(); |
| 144 } |
| 145 |
| 146 void MulticastCoreOobeView::ShowActiveDirectoryPasswordChangeScreen( |
| 147 const std::string& username) { |
| 148 for (CoreOobeView* view : views_) |
| 149 view->ShowActiveDirectoryPasswordChangeScreen(username); |
| 150 } |
| 151 |
| 152 } // namespace chromeos |
OLD | NEW |