OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PLATFORM_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_PLATFORM_H_ |
6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_PLATFORM_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_PLATFORM_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 "ui/aura/window_tree_host_platform.h" | 13 #include "ui/aura/window_tree_host_platform.h" |
12 | 14 |
13 namespace ash { | 15 namespace ash { |
14 | 16 |
15 class ASH_EXPORT AshWindowTreeHostPlatform | 17 class ASH_EXPORT AshWindowTreeHostPlatform |
16 : public AshWindowTreeHost, | 18 : public AshWindowTreeHost, |
17 public aura::WindowTreeHostPlatform { | 19 public aura::WindowTreeHostPlatform { |
18 public: | 20 public: |
19 explicit AshWindowTreeHostPlatform(const gfx::Rect& initial_bounds); | 21 explicit AshWindowTreeHostPlatform(const gfx::Rect& initial_bounds); |
20 ~AshWindowTreeHostPlatform() override; | 22 ~AshWindowTreeHostPlatform() override; |
21 | 23 |
22 protected: | 24 protected: |
23 AshWindowTreeHostPlatform(); | 25 AshWindowTreeHostPlatform(); |
24 | 26 |
25 // AshWindowTreeHost: | 27 // AshWindowTreeHost: |
26 void ToggleFullScreen() override; | 28 void ToggleFullScreen() override; |
27 bool ConfineCursorToRootWindow() override; | 29 bool ConfineCursorToRootWindow() override; |
28 void UnConfineCursor() override; | 30 void UnConfineCursor() override; |
29 void SetRootWindowTransformer( | 31 void SetRootWindowTransformer( |
30 scoped_ptr<RootWindowTransformer> transformer) override; | 32 std::unique_ptr<RootWindowTransformer> transformer) override; |
31 gfx::Insets GetHostInsets() const override; | 33 gfx::Insets GetHostInsets() const override; |
32 aura::WindowTreeHost* AsWindowTreeHost() override; | 34 aura::WindowTreeHost* AsWindowTreeHost() override; |
33 void PrepareForShutdown() override; | 35 void PrepareForShutdown() override; |
34 void SetRootTransform(const gfx::Transform& transform) override; | 36 void SetRootTransform(const gfx::Transform& transform) override; |
35 gfx::Transform GetRootTransform() const override; | 37 gfx::Transform GetRootTransform() const override; |
36 gfx::Transform GetInverseRootTransform() const override; | 38 gfx::Transform GetInverseRootTransform() const override; |
37 void UpdateRootWindowSize(const gfx::Size& host_size) override; | 39 void UpdateRootWindowSize(const gfx::Size& host_size) override; |
38 void OnCursorVisibilityChangedNative(bool show) override; | 40 void OnCursorVisibilityChangedNative(bool show) override; |
39 void SetBounds(const gfx::Rect& bounds) override; | 41 void SetBounds(const gfx::Rect& bounds) override; |
40 void DispatchEvent(ui::Event* event) override; | 42 void DispatchEvent(ui::Event* event) override; |
41 | 43 |
42 // ui::internal::InputMethodDelegate: | 44 // ui::internal::InputMethodDelegate: |
43 ui::EventDispatchDetails DispatchKeyEventPostIME( | 45 ui::EventDispatchDetails DispatchKeyEventPostIME( |
44 ui::KeyEvent* event) override; | 46 ui::KeyEvent* event) override; |
45 | 47 |
46 private: | 48 private: |
47 // Temporarily disable the tap-to-click feature. Used on CrOS. | 49 // Temporarily disable the tap-to-click feature. Used on CrOS. |
48 void SetTapToClickPaused(bool state); | 50 void SetTapToClickPaused(bool state); |
49 | 51 |
50 TransformerHelper transformer_helper_; | 52 TransformerHelper transformer_helper_; |
51 | 53 |
52 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostPlatform); | 54 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostPlatform); |
53 }; | 55 }; |
54 | 56 |
55 } // namespace ash | 57 } // namespace ash |
56 | 58 |
57 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_PLATFORM_H_ | 59 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_PLATFORM_H_ |
OLD | NEW |