Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ash / host / ash_window_tree_host.h
blobb9c617fac9762c788b9e70d253fbedbc092008a4
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.
5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_
6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_
8 #include "ash/ash_export.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace aura {
12 class Window;
13 class WindowTreeHost;
16 namespace gfx {
17 class Insets;
18 class Rect;
21 namespace ash {
22 struct AshWindowTreeHostInitParams;
23 class RootWindowTransformer;
25 class ASH_EXPORT AshWindowTreeHost {
26 public:
27 virtual ~AshWindowTreeHost() {}
29 // Creates a new AshWindowTreeHost. The caller owns the returned value.
30 static AshWindowTreeHost* Create(
31 const AshWindowTreeHostInitParams& init_params);
33 // Toggles the host's full screen state.
34 virtual void ToggleFullScreen() = 0;
36 // Clips the cursor to the bounds of the root window until UnConfineCursor().
37 // We would like to be able to confine the cursor to that window. However,
38 // currently, we do not have such functionality in X. So we just confine
39 // to the root window. This is ok because this option is currently only
40 // being used in fullscreen mode, so root_window bounds = window bounds.
41 virtual bool ConfineCursorToRootWindow() = 0;
42 virtual void UnConfineCursor() = 0;
44 virtual void SetRootWindowTransformer(
45 scoped_ptr<RootWindowTransformer> transformer) = 0;
47 virtual gfx::Insets GetHostInsets() const = 0;
49 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0;
51 // Updates the display IDs associated with this root window.
52 // A root window can be associated with up to 2 display IDs (e.g. in mirror
53 // mode dual monitors case). If the root window is only associated with one
54 // display id, then the other id should be set to
55 // gfx::Display::kInvalidDisplayID.
56 virtual void UpdateDisplayID(int64 id1, int64 id2) {}
58 // Stop listening for events in preparation for shutdown.
59 virtual void PrepareForShutdown() {}
62 } // namespace ash
64 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_