Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / wm / test / wm_test_helper.h
blobc0c09f606735b1d9166c330d12aca4d0d397ce3f
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.
5 #ifndef UI_WM_TEST_WM_TEST_HELPER_H_
6 #define UI_WM_TEST_WM_TEST_HELPER_H_
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"
13 namespace aura {
14 class Window;
15 class WindowTreeHost;
16 namespace client {
17 class DefaultCaptureClient;
18 class FocusClient;
22 namespace gfx {
23 class Rect;
24 class Size;
27 namespace ui {
28 class ContextFactory;
31 namespace wm {
33 class CompoundEventFilter;
35 // 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
37 // the ash parts of the code.
38 class WMTestHelper : public aura::client::WindowTreeClient {
39 public:
40 WMTestHelper(const gfx::Size& default_window_size,
41 ui::ContextFactory* context_factory);
42 ~WMTestHelper() override;
44 aura::WindowTreeHost* host() { return host_.get(); }
46 // Overridden from client::WindowTreeClient:
47 aura::Window* GetDefaultParent(aura::Window* context,
48 aura::Window* window,
49 const gfx::Rect& bounds) override;
51 private:
52 scoped_ptr<aura::WindowTreeHost> host_;
54 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_;
55 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
56 scoped_ptr<aura::client::FocusClient> focus_client_;
58 DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
61 } // namespace wm
63 #endif // UI_WM_TEST_WM_TEST_HELPER_H_