OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
9 #include "ash/common/strings/grit/ash_strings.h" | 9 #include "ash/common/strings/grit/ash_strings.h" |
10 #include "ash/common/system/date/date_default_view.h" | 10 #include "ash/common/system/date/date_default_view.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // Bring up the locker screen. | 223 // Bring up the locker screen. |
224 ScreenLocker::Show(); | 224 ScreenLocker::Show(); |
225 std::unique_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); | 225 std::unique_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); |
226 tester->EmulateWindowManagerReady(); | 226 tester->EmulateWindowManagerReady(); |
227 content::WindowedNotificationObserver lock_state_observer( | 227 content::WindowedNotificationObserver lock_state_observer( |
228 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, | 228 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, |
229 content::NotificationService::AllSources()); | 229 content::NotificationService::AllSources()); |
230 if (!tester->IsLocked()) | 230 if (!tester->IsLocked()) |
231 lock_state_observer.Wait(); | 231 lock_state_observer.Wait(); |
232 ScreenLocker* screen_locker = ScreenLocker::default_screen_locker(); | 232 ScreenLocker* screen_locker = ScreenLocker::default_screen_locker(); |
233 WebUIScreenLocker* web_ui_screen_locker = | 233 WebUIScreenLocker* web_ui_screen_locker = screen_locker->web_ui(); |
234 static_cast<WebUIScreenLocker*>(screen_locker->delegate()); | |
235 ASSERT_TRUE(web_ui_screen_locker); | 234 ASSERT_TRUE(web_ui_screen_locker); |
236 content::WebUI* web_ui = web_ui_screen_locker->GetWebUI(); | 235 content::WebUI* web_ui = web_ui_screen_locker->GetWebUI(); |
237 ASSERT_TRUE(web_ui); | 236 ASSERT_TRUE(web_ui); |
238 contents_ = web_ui->GetWebContents(); | 237 contents_ = web_ui->GetWebContents(); |
239 ASSERT_TRUE(contents_); | 238 ASSERT_TRUE(contents_); |
240 | 239 |
241 // Wait for the login UI to be ready. | 240 // Wait for the login UI to be ready. |
242 WaitUntilOobeUIIsReady( | 241 WaitUntilOobeUIIsReady( |
243 static_cast<OobeUI*>(web_ui->GetController())); | 242 static_cast<OobeUI*>(web_ui->GetController())); |
244 } | 243 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 PrepareAndRunScript("restart-header-bar-item", false); | 326 PrepareAndRunScript("restart-header-bar-item", false); |
328 PrepareAndRunScript("shutdown-header-bar-item", true); | 327 PrepareAndRunScript("shutdown-header-bar-item", true); |
329 | 328 |
330 UpdateRebootOnShutdownPolicy(false); | 329 UpdateRebootOnShutdownPolicy(false); |
331 RefreshDevicePolicy(); | 330 RefreshDevicePolicy(); |
332 PrepareAndRunScript("restart-header-bar-item", true); | 331 PrepareAndRunScript("restart-header-bar-item", true); |
333 PrepareAndRunScript("shutdown-header-bar-item", false); | 332 PrepareAndRunScript("shutdown-header-bar-item", false); |
334 } | 333 } |
335 | 334 |
336 } // namespace chromeos | 335 } // namespace chromeos |
OLD | NEW |