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

Side by Side Diff: ash/test/ash_test_helper.h

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef ASH_TEST_ASH_TEST_HELPER_H_ 5 #ifndef ASH_TEST_ASH_TEST_HELPER_H_
6 #define ASH_TEST_ASH_TEST_HELPER_H_ 6 #define ASH_TEST_ASH_TEST_HELPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
11 namespace aura { 11 namespace aura {
12 class RootWindow; 12 class Window;
13 } // namespace aura 13 } // namespace aura
14 14
15 namespace base { 15 namespace base {
16 class MessageLoopForUI; 16 class MessageLoopForUI;
17 } // namespace base 17 } // namespace base
18 18
19 namespace ui { 19 namespace ui {
20 class ScopedAnimationDurationScaleMode; 20 class ScopedAnimationDurationScaleMode;
21 } // namespace ui 21 } // namespace ui
22 22
(...skipping 11 matching lines...) Expand all
34 ~AshTestHelper(); 34 ~AshTestHelper();
35 35
36 // Creates the ash::Shell and performs associated initialization. 36 // Creates the ash::Shell and performs associated initialization.
37 // Set |start_session| to true if the user should log in before 37 // Set |start_session| to true if the user should log in before
38 // the test is run. 38 // the test is run.
39 void SetUp(bool start_session); 39 void SetUp(bool start_session);
40 40
41 // Destroys the ash::Shell and performs associated cleanup. 41 // Destroys the ash::Shell and performs associated cleanup.
42 void TearDown(); 42 void TearDown();
43 43
44 // Returns a RootWindow. Usually this is the active RootWindow, but that 44 // Returns a root Window. Usually this is the active root Window, but that
45 // method can return NULL sometimes, and in those cases, we fall back on the 45 // method can return NULL sometimes, and in those cases, we fall back on the
46 // primary RootWindow. 46 // primary root Window.
47 aura::RootWindow* CurrentContext(); 47 aura::Window* CurrentContext();
48 48
49 void RunAllPendingInMessageLoop(); 49 void RunAllPendingInMessageLoop();
50 50
51 base::MessageLoopForUI* message_loop() { return message_loop_; } 51 base::MessageLoopForUI* message_loop() { return message_loop_; }
52 TestShellDelegate* test_shell_delegate() { return test_shell_delegate_; } 52 TestShellDelegate* test_shell_delegate() { return test_shell_delegate_; }
53 TestScreenshotDelegate* test_screenshot_delegate() { 53 TestScreenshotDelegate* test_screenshot_delegate() {
54 return test_screenshot_delegate_; 54 return test_screenshot_delegate_;
55 } 55 }
56 56
57 private: 57 private:
58 base::MessageLoopForUI* message_loop_; // Not owned. 58 base::MessageLoopForUI* message_loop_; // Not owned.
59 TestShellDelegate* test_shell_delegate_; // Owned by ash::Shell. 59 TestShellDelegate* test_shell_delegate_; // Owned by ash::Shell.
60 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 60 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
61 61
62 // Owned by ash::AcceleratorController 62 // Owned by ash::AcceleratorController
63 TestScreenshotDelegate* test_screenshot_delegate_; 63 TestScreenshotDelegate* test_screenshot_delegate_;
64 64
65 // true, if NetworkHandler was initialized by this instance. 65 // true, if NetworkHandler was initialized by this instance.
66 bool tear_down_network_handler_; 66 bool tear_down_network_handler_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(AshTestHelper); 68 DISALLOW_COPY_AND_ASSIGN(AshTestHelper);
69 }; 69 };
70 70
71 } // namespace test 71 } // namespace test
72 } // namespace ash 72 } // namespace ash
73 73
74 #endif // ASH_TEST_ASH_TEST_HELPER_H_ 74 #endif // ASH_TEST_ASH_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698