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

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

Issue 1469803006: NOT FOR REVIEW: Aura Android: Content Shell compiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_wthandroid
Patch Set: Temp Created 5 years 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/views/test/test_views_delegate_aura.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 "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 #include "ui/aura/client/window_tree_client.h" 10 #include "ui/aura/client/window_tree_client.h"
11 #include "ui/aura/window_tree_host.h" 11 #include "ui/aura/window_tree_host.h"
12 12
13 namespace aura { 13 namespace aura {
14 class Window; 14 class Window;
15 class WindowTreeHost; 15 class WindowTreeHost;
16 namespace client { 16 namespace client {
17 class DefaultCaptureClient; 17 class DefaultCaptureClient;
18 class DispatcherClient;
18 class FocusClient; 19 class FocusClient;
20 class ScreenPositionClient;
19 } 21 }
20 } 22 }
21 23
22 namespace gfx { 24 namespace gfx {
23 class Rect; 25 class Rect;
24 class Size; 26 class Size;
25 } 27 }
26 28
27 namespace ui { 29 namespace ui {
28 class ContextFactory; 30 class ContextFactory;
29 } 31 }
30 32
31 namespace wm { 33 namespace wm {
32 34
33 class CompoundEventFilter; 35 class CompoundEventFilter;
34 36
35 // Creates a minimal environment for running the shell. We can't pull in all of 37 // Creates a minimal environment for running the shell. We can't pull in all of
36 // ash here, but we can create attach several of the same things we'd find in 38 // ash here, but we can create attach several of the same things we'd find in
37 // the ash parts of the code. 39 // the ash parts of the code.
38 class WMTestHelper : public aura::client::WindowTreeClient { 40 class WMTestHelper : public aura::client::WindowTreeClient {
39 public: 41 public:
40 WMTestHelper(const gfx::Size& default_window_size, 42 WMTestHelper(const gfx::Size& default_window_size,
41 ui::ContextFactory* context_factory); 43 ui::ContextFactory* context_factory);
42 ~WMTestHelper() override; 44 ~WMTestHelper() override;
43 45
44 aura::WindowTreeHost* host() { return host_.get(); } 46 aura::WindowTreeHost* host() { return host_.get(); }
45 47
48 void Init();
49
46 // Overridden from client::WindowTreeClient: 50 // Overridden from client::WindowTreeClient:
47 aura::Window* GetDefaultParent(aura::Window* context, 51 aura::Window* GetDefaultParent(aura::Window* context,
48 aura::Window* window, 52 aura::Window* window,
49 const gfx::Rect& bounds) override; 53 const gfx::Rect& bounds) override;
50 54
51 private: 55 private:
52 scoped_ptr<aura::WindowTreeHost> host_; 56 scoped_ptr<aura::WindowTreeHost> host_;
53 57
54 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; 58 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_;
55 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 59 // scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
56 scoped_ptr<aura::client::FocusClient> focus_client_; 60 // scoped_ptr<aura::client::FocusClient> focus_client_;
61 // scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_;
62 // scoped_ptr<aura::client::DispatcherClient> dispatcher_client_;
57 63
58 DISALLOW_COPY_AND_ASSIGN(WMTestHelper); 64 DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
59 }; 65 };
60 66
61 } // namespace wm 67 } // namespace wm
62 68
63 #endif // UI_WM_TEST_WM_TEST_HELPER_H_ 69 #endif // UI_WM_TEST_WM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/views/test/test_views_delegate_aura.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698