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

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: fix license 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/compiler_specific.h"
13 #include "base/run_loop.h"
14
15 namespace apps {
16 class AppWindow;
17 }
18
19 namespace chromeos {
20
21 // Helper class that monitors app windows to wait for a window to appear.
22 // Use a new instance for each use, one instance will only work for one Wait.
23 class AppWindowWaiter : public apps::AppWindowRegistry::Observer {
24 public:
25 AppWindowWaiter(apps::AppWindowRegistry* registry,
26 const std::string& app_id);
27 virtual ~AppWindowWaiter();
28
29 apps::AppWindow* Wait();
30
31 // AppWindowRegistry::Observer:
32 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE;
33 virtual void OnAppWindowIconChanged(apps::AppWindow* app_window) OVERRIDE;
34 virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE;
35
36 private:
37 apps::AppWindowRegistry* registry_;
38 std::string app_id_;
39 base::RunLoop run_loop_;
40 apps::AppWindow* window_;
41
42 DISALLOW_COPY_AND_ASSIGN(AppWindowWaiter);
43 };
44
45 } // namespace chromeos
46
47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_APP_WINDOW_WAITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator.cc ('k') | chrome/browser/chromeos/login/test/app_window_waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698