OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 JsConditionWaiter(content::WebContents* web_contents, | 253 JsConditionWaiter(content::WebContents* web_contents, |
254 const std::string& js) | 254 const std::string& js) |
255 : web_contents_(web_contents), | 255 : web_contents_(web_contents), |
256 js_(js) { | 256 js_(js) { |
257 } | 257 } |
258 | 258 |
259 void Wait() { | 259 void Wait() { |
260 if (CheckJs()) | 260 if (CheckJs()) |
261 return; | 261 return; |
262 | 262 |
263 base::RepeatingTimer<JsConditionWaiter> check_timer; | 263 base::RepeatingTimer check_timer; |
264 check_timer.Start( | 264 check_timer.Start( |
265 FROM_HERE, | 265 FROM_HERE, |
266 base::TimeDelta::FromMilliseconds(10), | 266 base::TimeDelta::FromMilliseconds(10), |
267 this, | 267 this, |
268 &JsConditionWaiter::OnTimer); | 268 &JsConditionWaiter::OnTimer); |
269 | 269 |
270 runner_ = new content::MessageLoopRunner; | 270 runner_ = new content::MessageLoopRunner; |
271 runner_->Run(); | 271 runner_->Run(); |
272 } | 272 } |
273 | 273 |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 content::WindowedNotificationObserver( | 2110 content::WindowedNotificationObserver( |
2111 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, | 2111 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, |
2112 content::NotificationService::AllSources()).Wait(); | 2112 content::NotificationService::AllSources()).Wait(); |
2113 | 2113 |
2114 // Wait for the wallpaper to load. | 2114 // Wait for the wallpaper to load. |
2115 WaitForWallpaper(); | 2115 WaitForWallpaper(); |
2116 EXPECT_TRUE(wallpaper_loaded()); | 2116 EXPECT_TRUE(wallpaper_loaded()); |
2117 } | 2117 } |
2118 | 2118 |
2119 } // namespace chromeos | 2119 } // namespace chromeos |
OLD | NEW |