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

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

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

Powered by Google App Engine
This is Rietveld 408576698