blob: f8ae67bd1d952f364502f2346938f533af3da15a [file] [log] [blame]
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001// 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_SHELL_MINIMAL_SHELL_H_
6#define UI_SHELL_MINIMAL_SHELL_H_
7
8#include "base/compiler_specific.h"
9#include "base/memory/scoped_ptr.h"
10#include "ui/aura/client/stacking_client.h"
11
12namespace aura {
13class RootWindow;
14class Window;
15namespace client {
16class DefaultActivationClient;
17class DefaultCaptureClient;
18class FocusClient;
19} // class client
20} // class aura
21
22namespace gfx {
23class Rect;
24class Size;
25} // class gfx
26
27namespace views {
28namespace corewm {
29class CompoundEventFilter;
30class InputMethodEventFilter;
31} // corewm
32} // views
33
34namespace shell {
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.
39class MinimalShell : public aura::client::StackingClient {
40 public:
41 explicit MinimalShell(const gfx::Size& default_window_size);
42 virtual ~MinimalShell();
43
44 aura::RootWindow* root_window() { return root_window_.get(); }
45
46 // Overridden from client::StackingClient:
47 virtual aura::Window* GetDefaultParent(aura::Window* context,
48 aura::Window* window,
49 const gfx::Rect& bounds) OVERRIDE;
50
51 private:
52 scoped_ptr<aura::RootWindow> root_window_;
53
54 // Owned by RootWindow
55 views::corewm::CompoundEventFilter* root_window_event_filter_;
56
57 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
58 scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_;
59 scoped_ptr<aura::client::DefaultActivationClient> activation_client_;
60 scoped_ptr<aura::client::FocusClient> focus_client_;
61
62 DISALLOW_COPY_AND_ASSIGN(MinimalShell);
63};
64
65} // namespace shell
66
67#endif // UI_SHELL_MINIMAL_SHELL_H_