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

Side by Side Diff: ui/aura/test/aura_test_helper.h

Issue 1871253002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 4 years, 8 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
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/test/aura_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 (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 UI_AURA_TEST_AURA_TEST_HELPER_H_ 5 #ifndef UI_AURA_TEST_AURA_TEST_HELPER_H_
6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_ 6 #define UI_AURA_TEST_AURA_TEST_HELPER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/window_event_dispatcher.h" 12 #include "ui/aura/window_event_dispatcher.h"
11 #include "ui/aura/window_tree_host.h" 13 #include "ui/aura/window_tree_host.h"
12 14
15 namespace aura {
16 class Env;
17 }
18
13 namespace base { 19 namespace base {
14 class MessageLoopForUI; 20 class MessageLoopForUI;
15 } 21 }
16 22
17 namespace ui { 23 namespace ui {
18 class ContextFactory; 24 class ContextFactory;
19 class InputMethod; 25 class InputMethod;
20 class ScopedAnimationDurationScaleMode; 26 class ScopedAnimationDurationScaleMode;
21 } 27 }
22 28
(...skipping 27 matching lines...) Expand all
50 Window* root_window() { return host_->window(); } 56 Window* root_window() { return host_->window(); }
51 ui::EventProcessor* event_processor() { return host_->event_processor(); } 57 ui::EventProcessor* event_processor() { return host_->event_processor(); }
52 WindowTreeHost* host() { return host_.get(); } 58 WindowTreeHost* host() { return host_.get(); }
53 59
54 TestScreen* test_screen() { return test_screen_.get(); } 60 TestScreen* test_screen() { return test_screen_.get(); }
55 61
56 private: 62 private:
57 base::MessageLoopForUI* message_loop_; 63 base::MessageLoopForUI* message_loop_;
58 bool setup_called_; 64 bool setup_called_;
59 bool teardown_called_; 65 bool teardown_called_;
60 bool env_created_; 66 std::unique_ptr<aura::Env> env_;
61 scoped_ptr<WindowTreeHost> host_; 67 scoped_ptr<WindowTreeHost> host_;
62 scoped_ptr<TestWindowTreeClient> stacking_client_; 68 scoped_ptr<TestWindowTreeClient> stacking_client_;
63 scoped_ptr<client::DefaultCaptureClient> capture_client_; 69 scoped_ptr<client::DefaultCaptureClient> capture_client_;
64 scoped_ptr<client::FocusClient> focus_client_; 70 scoped_ptr<client::FocusClient> focus_client_;
65 scoped_ptr<TestScreen> test_screen_; 71 scoped_ptr<TestScreen> test_screen_;
66 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 72 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
67 73
68 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); 74 DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
69 }; 75 };
70 76
71 } // namespace test 77 } // namespace test
72 } // namespace aura 78 } // namespace aura
73 79
74 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_ 80 #endif // UI_AURA_TEST_AURA_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698