OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ | 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_ |
6 #define ASH_TEST_ASH_TEST_BASE_H_ | 6 #define ASH_TEST_ASH_TEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace ash { | 33 namespace ash { |
34 namespace internal { | 34 namespace internal { |
35 class DisplayManager; | 35 class DisplayManager; |
36 } // namespace internal | 36 } // namespace internal |
37 | 37 |
38 namespace test { | 38 namespace test { |
39 | 39 |
40 class AshTestHelper; | 40 class AshTestHelper; |
41 class TestScreenshotDelegate; | 41 class TestScreenshotDelegate; |
| 42 class TestSystemTrayDelegate; |
42 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
43 class TestMetroViewerProcessHost; | 44 class TestMetroViewerProcessHost; |
44 #endif | 45 #endif |
45 | 46 |
46 class AshTestViewsDelegate : public views::TestViewsDelegate { | 47 class AshTestViewsDelegate : public views::TestViewsDelegate { |
47 public: | 48 public: |
48 // Overriden from TestViewsDelegate. | 49 // Overriden from TestViewsDelegate. |
49 virtual content::WebContents* CreateWebContents( | 50 virtual content::WebContents* CreateWebContents( |
50 content::BrowserContext* browser_context, | 51 content::BrowserContext* browser_context, |
51 content::SiteInstance* site_instance) OVERRIDE; | 52 content::SiteInstance* site_instance) OVERRIDE; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 110 |
110 // True if the running environment supports host window resize, | 111 // True if the running environment supports host window resize, |
111 // or false otherwise (e.g. win8 bot). | 112 // or false otherwise (e.g. win8 bot). |
112 static bool SupportsHostWindowResize(); | 113 static bool SupportsHostWindowResize(); |
113 | 114 |
114 void set_start_session(bool start_session) { start_session_ = start_session; } | 115 void set_start_session(bool start_session) { start_session_ = start_session; } |
115 | 116 |
116 void RunAllPendingInMessageLoop(); | 117 void RunAllPendingInMessageLoop(); |
117 | 118 |
118 TestScreenshotDelegate* GetScreenshotDelegate(); | 119 TestScreenshotDelegate* GetScreenshotDelegate(); |
| 120 TestSystemTrayDelegate* GetSystemTrayDelegate(); |
119 | 121 |
120 // Utility methods to emulate user logged in or not, session started or not | 122 // Utility methods to emulate user logged in or not, session started or not |
121 // and user able to lock screen or not cases. | 123 // and user able to lock screen or not cases. |
122 void SetSessionStarted(bool session_started); | 124 void SetSessionStarted(bool session_started); |
123 void SetUserLoggedIn(bool user_logged_in); | 125 void SetUserLoggedIn(bool user_logged_in); |
124 void SetCanLockScreen(bool can_lock_screen); | 126 void SetCanLockScreen(bool can_lock_screen); |
125 void SetShouldLockScreenBeforeSuspending(bool should_lock); | 127 void SetShouldLockScreenBeforeSuspending(bool should_lock); |
126 void SetUserAddingScreenRunning(bool user_adding_screen_running); | 128 void SetUserAddingScreenRunning(bool user_adding_screen_running); |
127 | 129 |
128 // Methods to emulate blocking and unblocking user session with given | 130 // Methods to emulate blocking and unblocking user session with given |
(...skipping 28 matching lines...) Expand all Loading... |
157 virtual ~NoSessionAshTestBase() {} | 159 virtual ~NoSessionAshTestBase() {} |
158 | 160 |
159 private: | 161 private: |
160 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 162 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
161 }; | 163 }; |
162 | 164 |
163 } // namespace test | 165 } // namespace test |
164 } // namespace ash | 166 } // namespace ash |
165 | 167 |
166 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 168 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |