| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class Window; | 12 class Window; |
| 13 class WindowTreeHost; | 13 class WindowTreeHost; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class Insets; |
| 17 class Rect; | 18 class Rect; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace ash { | 21 namespace ash { |
| 21 class RootWindowTransformer; | 22 class RootWindowTransformer; |
| 22 | 23 |
| 23 class ASH_EXPORT AshWindowTreeHost { | 24 class ASH_EXPORT AshWindowTreeHost { |
| 24 public: | 25 public: |
| 25 // Creates a new AshWindowTreeHost. The caller owns the returned value. | 26 // Creates a new AshWindowTreeHost. The caller owns the returned value. |
| 26 static AshWindowTreeHost* Create(const gfx::Rect& initial_bounds); | 27 static AshWindowTreeHost* Create(const gfx::Rect& initial_bounds); |
| 27 | 28 |
| 28 virtual ~AshWindowTreeHost() {} | 29 virtual ~AshWindowTreeHost() {} |
| 29 | 30 |
| 30 // Toggles the host's full screen state. | 31 // Toggles the host's full screen state. |
| 31 virtual void ToggleFullScreen() = 0; | 32 virtual void ToggleFullScreen() = 0; |
| 32 | 33 |
| 33 // Clips the cursor to the bounds of the root window until UnConfineCursor(). | 34 // 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 // 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 // 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 // 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 // being used in fullscreen mode, so root_window bounds = window bounds. |
| 38 virtual bool ConfineCursorToRootWindow() = 0; | 39 virtual bool ConfineCursorToRootWindow() = 0; |
| 39 virtual void UnConfineCursor() = 0; | 40 virtual void UnConfineCursor() = 0; |
| 40 | 41 |
| 41 virtual void SetRootWindowTransformer( | 42 virtual void SetRootWindowTransformer( |
| 42 scoped_ptr<RootWindowTransformer> transformer) = 0; | 43 scoped_ptr<RootWindowTransformer> transformer) = 0; |
| 43 | 44 |
| 45 virtual gfx::Insets GetHostInsets() const = 0; |
| 46 |
| 44 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0; | 47 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0; |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 } // namespace ash | 50 } // namespace ash |
| 48 | 51 |
| 49 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 52 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| OLD | NEW |