Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/browser/chromeos/login/test/app_window_waiter.h

Issue 205713002: Add a basic demo mode browser test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_APP_WINDOW_WAITER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_APP_WINDOW_WAITER_H_
7
8 #include <string>
9
10 #include "apps/app_window_registry.h"
11 #include "base/basictypes.h"
12 #include "base/run_loop.h"
13
14 namespace apps {
15 class AppWindow;
16 }
17
18 namespace chromeos {
19
20 // Helper class that monitors app windows to wait for a window to appear.
21 class AppWindowWaiter : public apps::AppWindowRegistry::Observer {
22 public:
23 AppWindowWaiter(apps::AppWindowRegistry* registry,
24 const std::string& app_id);
25 virtual ~AppWindowWaiter();
26
27 apps::AppWindow* Wait();
bartfab (slow) 2014/03/27 14:13:29 Nit: RunLoop::Run() can only be called once per Ru
rkc 2014/03/27 21:43:10 Done.
28
29 // AppWindowRegistry::Observer:
30 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
bartfab (slow) 2014/03/27 14:13:29 Nit: #include "base/compiler_specific.h"
rkc 2014/03/27 21:43:10 Done.
31 virtual void OnAppWindowIconChanged(apps::AppWindow* app_window) OVERRIDE;
32 virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE;
33
34 private:
35 apps::AppWindowRegistry* registry_;
36 std::string app_id_;
37 base::RunLoop run_loop_;
38 apps::AppWindow* window_;
39
40 DISALLOW_COPY_AND_ASSIGN(AppWindowWaiter);
41 };
42
43 } // namespace chromeos
44
45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_APP_WINDOW_WAITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698