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

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

Issue 213033002: Revert 259580 "Move wm/public into wm target" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/ui/wm/public/window_move_client.h ('k') | trunk/src/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/test/aura_test_helper.h" 10 #include "ui/aura/client/window_tree_client.h"
11 #include "ui/aura/window_tree_host.h"
11 12
12 namespace aura { 13 namespace aura {
14 class Window;
15 class WindowTreeHost;
13 namespace client { 16 namespace client {
14 class DefaultActivationClient; 17 class DefaultActivationClient;
18 class DefaultCaptureClient;
19 class FocusClient;
15 } 20 }
16 } 21 }
17 22
18 namespace gfx { 23 namespace gfx {
24 class Rect;
19 class Size; 25 class Size;
20 } 26 }
21 27
22 namespace wm { 28 namespace wm {
29 class CompoundEventFilter;
30 class InputMethodEventFilter;
31 }
32
33 namespace wm {
23 34
24 // Creates a minimal environment for running the shell. We can't pull in all of 35 // Creates a minimal environment for running the shell. We can't pull in all of
25 // ash here, but we can create attach several of the same things we'd find in 36 // ash here, but we can create attach several of the same things we'd find in
26 // the ash parts of the code. 37 // the ash parts of the code.
27 class WMTestHelper : public aura::test::AuraTestHelper { 38 class WMTestHelper : public aura::client::WindowTreeClient {
28 public: 39 public:
29 explicit WMTestHelper(const gfx::Size& default_window_size); 40 explicit WMTestHelper(const gfx::Size& default_window_size);
30 WMTestHelper();
31 virtual ~WMTestHelper(); 41 virtual ~WMTestHelper();
32 42
33 // Overridden from aura::test::AuraTestHelper: 43 aura::WindowTreeHost* host() { return host_.get(); }
34 virtual void SetUp() OVERRIDE; 44
35 virtual void TearDown() OVERRIDE; 45 // Overridden from client::WindowTreeClient:
46 virtual aura::Window* GetDefaultParent(aura::Window* context,
47 aura::Window* window,
48 const gfx::Rect& bounds) OVERRIDE;
36 49
37 private: 50 private:
51 scoped_ptr<aura::WindowTreeHost> host_;
52
53 // Owned by the root Window.
54 wm::CompoundEventFilter* root_window_event_filter_;
55
56 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
57 scoped_ptr<wm::InputMethodEventFilter> input_method_filter_;
38 scoped_ptr<aura::client::DefaultActivationClient> activation_client_; 58 scoped_ptr<aura::client::DefaultActivationClient> activation_client_;
59 scoped_ptr<aura::client::FocusClient> focus_client_;
39 60
40 DISALLOW_COPY_AND_ASSIGN(WMTestHelper); 61 DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
41 }; 62 };
42 63
43 } // namespace wm 64 } // namespace wm
44 65
45 #endif // UI_WM_TEST_WM_TEST_HELPER_H_ 66 #endif // UI_WM_TEST_WM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « trunk/src/ui/wm/public/window_move_client.h ('k') | trunk/src/ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698