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

Side by Side Diff: ui/wm/test/wm_test_helper.h

Issue 2438853002: Renames aura::client::WindowTreeClient to WindowParentingClient (Closed)
Patch Set: cleanup Created 4 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
« no previous file with comments | « ui/wm/core/transient_window_manager_unittest.cc ('k') | ui/wm/test/wm_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 UI_WM_TEST_WM_TEST_HELPER_H_ 5 #ifndef UI_WM_TEST_WM_TEST_HELPER_H_
6 #define UI_WM_TEST_WM_TEST_HELPER_H_ 6 #define UI_WM_TEST_WM_TEST_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/aura/client/window_tree_client.h" 12 #include "ui/aura/client/window_parenting_client.h"
13 #include "ui/aura/window_tree_host.h" 13 #include "ui/aura/window_tree_host.h"
14 14
15 namespace aura { 15 namespace aura {
16 class InputMethodGlue; 16 class InputMethodGlue;
17 class Window; 17 class Window;
18 class WindowTreeHost; 18 class WindowTreeHost;
19 namespace client { 19 namespace client {
20 class DefaultCaptureClient; 20 class DefaultCaptureClient;
21 class FocusClient; 21 class FocusClient;
22 } 22 }
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class Rect; 26 class Rect;
27 class Size; 27 class Size;
28 } 28 }
29 29
30 namespace ui { 30 namespace ui {
31 class ContextFactory; 31 class ContextFactory;
32 } 32 }
33 33
34 namespace wm { 34 namespace wm {
35 35
36 class CompoundEventFilter; 36 class CompoundEventFilter;
37 37
38 // Creates a minimal environment for running the shell. We can't pull in all of 38 // Creates a minimal environment for running the shell. We can't pull in all of
39 // ash here, but we can create attach several of the same things we'd find in 39 // ash here, but we can create attach several of the same things we'd find in
40 // the ash parts of the code. 40 // the ash parts of the code.
41 class WMTestHelper : public aura::client::WindowTreeClient { 41 class WMTestHelper : public aura::client::WindowParentingClient {
42 public: 42 public:
43 WMTestHelper(const gfx::Size& default_window_size, 43 WMTestHelper(const gfx::Size& default_window_size,
44 ui::ContextFactory* context_factory); 44 ui::ContextFactory* context_factory);
45 ~WMTestHelper() override; 45 ~WMTestHelper() override;
46 46
47 aura::WindowTreeHost* host() { return host_.get(); } 47 aura::WindowTreeHost* host() { return host_.get(); }
48 48
49 // Overridden from client::WindowTreeClient: 49 // Overridden from client::WindowParentingClient:
50 aura::Window* GetDefaultParent(aura::Window* context, 50 aura::Window* GetDefaultParent(aura::Window* context,
51 aura::Window* window, 51 aura::Window* window,
52 const gfx::Rect& bounds) override; 52 const gfx::Rect& bounds) override;
53 53
54 private: 54 private:
55 std::unique_ptr<aura::WindowTreeHost> host_; 55 std::unique_ptr<aura::WindowTreeHost> host_;
56 std::unique_ptr<aura::InputMethodGlue> input_method_glue_; 56 std::unique_ptr<aura::InputMethodGlue> input_method_glue_;
57 std::unique_ptr<wm::CompoundEventFilter> root_window_event_filter_; 57 std::unique_ptr<wm::CompoundEventFilter> root_window_event_filter_;
58 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_; 58 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_;
59 std::unique_ptr<aura::client::FocusClient> focus_client_; 59 std::unique_ptr<aura::client::FocusClient> focus_client_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(WMTestHelper); 61 DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
62 }; 62 };
63 63
64 } // namespace wm 64 } // namespace wm
65 65
66 #endif // UI_WM_TEST_WM_TEST_HELPER_H_ 66 #endif // UI_WM_TEST_WM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/wm/core/transient_window_manager_unittest.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698