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_X11_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_ |
6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "ash/host/ash_window_tree_host.h" | 11 #include "ash/host/ash_window_tree_host.h" |
10 #include "ash/host/transformer_helper.h" | 12 #include "ash/host/transformer_helper.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "ui/aura/env_observer.h" | 14 #include "ui/aura/env_observer.h" |
14 #include "ui/aura/window_tree_host_x11.h" | 15 #include "ui/aura/window_tree_host_x11.h" |
15 | 16 |
16 namespace ash { | 17 namespace ash { |
17 class RootWindowTransformer; | 18 class RootWindowTransformer; |
18 class MouseCursorEventFilter; | 19 class MouseCursorEventFilter; |
19 | 20 |
20 class ASH_EXPORT AshWindowTreeHostX11 : public AshWindowTreeHost, | 21 class ASH_EXPORT AshWindowTreeHostX11 : public AshWindowTreeHost, |
21 public aura::WindowTreeHostX11, | 22 public aura::WindowTreeHostX11, |
22 public aura::EnvObserver { | 23 public aura::EnvObserver { |
23 public: | 24 public: |
24 explicit AshWindowTreeHostX11(const gfx::Rect& initial_bounds); | 25 explicit AshWindowTreeHostX11(const gfx::Rect& initial_bounds); |
25 ~AshWindowTreeHostX11() override; | 26 ~AshWindowTreeHostX11() override; |
26 | 27 |
27 private: | 28 private: |
28 // AshWindowTreeHost: | 29 // AshWindowTreeHost: |
29 void ToggleFullScreen() override; | 30 void ToggleFullScreen() override; |
30 bool ConfineCursorToRootWindow() override; | 31 bool ConfineCursorToRootWindow() override; |
31 void UnConfineCursor() override; | 32 void UnConfineCursor() override; |
32 void SetRootWindowTransformer( | 33 void SetRootWindowTransformer( |
33 scoped_ptr<RootWindowTransformer> transformer) override; | 34 std::unique_ptr<RootWindowTransformer> transformer) override; |
34 gfx::Insets GetHostInsets() const override; | 35 gfx::Insets GetHostInsets() const override; |
35 aura::WindowTreeHost* AsWindowTreeHost() override; | 36 aura::WindowTreeHost* AsWindowTreeHost() override; |
36 void PrepareForShutdown() override; | 37 void PrepareForShutdown() override; |
37 | 38 |
38 // aura::WindowTreehost: | 39 // aura::WindowTreehost: |
39 void SetBounds(const gfx::Rect& bounds) override; | 40 void SetBounds(const gfx::Rect& bounds) override; |
40 gfx::Transform GetRootTransform() const override; | 41 gfx::Transform GetRootTransform() const override; |
41 void SetRootTransform(const gfx::Transform& transform) override; | 42 void SetRootTransform(const gfx::Transform& transform) override; |
42 gfx::Transform GetInverseRootTransform() const override; | 43 gfx::Transform GetInverseRootTransform() const override; |
43 void UpdateRootWindowSize(const gfx::Size& host_size) override; | 44 void UpdateRootWindowSize(const gfx::Size& host_size) override; |
(...skipping 11 matching lines...) Expand all Loading... |
55 // ui::internal::InputMethodDelegate: | 56 // ui::internal::InputMethodDelegate: |
56 ui::EventDispatchDetails DispatchKeyEventPostIME( | 57 ui::EventDispatchDetails DispatchKeyEventPostIME( |
57 ui::KeyEvent* event) override; | 58 ui::KeyEvent* event) override; |
58 | 59 |
59 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
60 // Set the CrOS touchpad "tap paused" property. It is used to temporarily | 61 // Set the CrOS touchpad "tap paused" property. It is used to temporarily |
61 // turn off the Tap-to-click feature when the mouse pointer is invisible. | 62 // turn off the Tap-to-click feature when the mouse pointer is invisible. |
62 void SetCrOSTapPaused(bool state); | 63 void SetCrOSTapPaused(bool state); |
63 #endif | 64 #endif |
64 | 65 |
65 scoped_ptr<XID[]> pointer_barriers_; | 66 std::unique_ptr<XID[]> pointer_barriers_; |
66 | 67 |
67 TransformerHelper transformer_helper_; | 68 TransformerHelper transformer_helper_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostX11); | 70 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostX11); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace ash | 73 } // namespace ash |
73 | 74 |
74 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_ | 75 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |