ash_window_tree_host.h revision a02191e04bc25c4935f804f2c080ae28663d096d
1// Copyright 2014 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 ASH_HOST_ASH_WINDOW_TREE_HOST_H_
6#define ASH_HOST_ASH_WINDOW_TREE_HOST_H_
7
8#include "ash/ash_export.h"
9#include "base/memory/scoped_ptr.h"
10
11namespace aura {
12class Window;
13class WindowTreeHost;
14}
15
16namespace gfx {
17class Rect;
18}
19
20namespace ash {
21class RootWindowTransformer;
22
23class ASH_EXPORT AshWindowTreeHost {
24 public:
25  // Creates a new AshWindowTreeHost. The caller owns the returned value.
26  static AshWindowTreeHost* Create(const gfx::Rect& initial_bounds);
27
28  virtual ~AshWindowTreeHost() {}
29
30  // Toggles the host's full screen state.
31  virtual void ToggleFullScreen() = 0;
32
33  // Clips the cursor to the bounds of the root window until UnConfineCursor().
34  // We would like to be able to confine the cursor to that window. However,
35  // currently, we do not have such functionality in X. So we just confine
36  // to the root window. This is ok because this option is currently only
37  // being used in fullscreen mode, so root_window bounds = window bounds.
38  virtual bool ConfineCursorToRootWindow() = 0;
39  virtual void UnConfineCursor() = 0;
40
41  virtual void SetRootWindowTransformer(
42      scoped_ptr<RootWindowTransformer> transformer) = 0;
43
44  virtual aura::WindowTreeHost* AsWindowTreeHost() = 0;
45};
46
47}  // namespace ash
48
49#endif  // ASH_HOST_ASH_WINDOW_TREE_HOST_H_
50