| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UNIFIED_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
| 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/host/ash_window_tree_host.h" | 10 #include "ash/host/ash_window_tree_host.h" |
| 11 #include "ash/host/transformer_helper.h" | 11 #include "ash/host/transformer_helper.h" |
| 12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 13 #include "ui/aura/window_tree_host.h" | 13 #include "ui/aura/window_tree_host.h" |
| 14 #include "ui/events/event_source.h" | 14 #include "ui/events/event_source.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class Reflector; | 18 class Reflector; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| 22 class DisplayInfo; | 22 class DisplayInfo; |
| 23 | 23 |
| 24 // A WTH used for unified desktop mode. This creates an offscreen | 24 // A WTH used for unified desktop mode. This creates an offscreen |
| 25 // compositor whose texture will be copied into each displays' | 25 // compositor whose texture will be copied into each displays' |
| 26 // compositor. | 26 // compositor. |
| 27 class AshWindowTreeHostUnified : public AshWindowTreeHost, | 27 class AshWindowTreeHostUnified : public AshWindowTreeHost, |
| 28 public aura::WindowTreeHost, | 28 public aura::WindowTreeHost, |
| 29 public aura::WindowObserver, | 29 public aura::WindowObserver { |
| 30 public ui::EventSource { | |
| 31 public: | 30 public: |
| 32 explicit AshWindowTreeHostUnified(const gfx::Rect& initial_bounds); | 31 explicit AshWindowTreeHostUnified(const gfx::Rect& initial_bounds); |
| 33 ~AshWindowTreeHostUnified() override; | 32 ~AshWindowTreeHostUnified() override; |
| 34 | 33 |
| 35 private: | 34 private: |
| 36 // AshWindowTreeHost: | 35 // AshWindowTreeHost: |
| 37 void ToggleFullScreen() override; | 36 void ToggleFullScreen() override; |
| 38 bool ConfineCursorToRootWindow() override; | 37 bool ConfineCursorToRootWindow() override; |
| 39 void UnConfineCursor() override; | 38 void UnConfineCursor() override; |
| 40 void SetRootWindowTransformer( | 39 void SetRootWindowTransformer( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 void SetCapture() override; | 57 void SetCapture() override; |
| 59 void ReleaseCapture() override; | 58 void ReleaseCapture() override; |
| 60 gfx::Point GetLocationOnNativeScreen() const override; | 59 gfx::Point GetLocationOnNativeScreen() const override; |
| 61 void SetCursorNative(gfx::NativeCursor cursor) override; | 60 void SetCursorNative(gfx::NativeCursor cursor) override; |
| 62 void MoveCursorToNative(const gfx::Point& location) override; | 61 void MoveCursorToNative(const gfx::Point& location) override; |
| 63 void OnCursorVisibilityChangedNative(bool show) override; | 62 void OnCursorVisibilityChangedNative(bool show) override; |
| 64 | 63 |
| 65 // aura::WindowObserver: | 64 // aura::WindowObserver: |
| 66 void OnWindowDestroying(aura::Window* window) override; | 65 void OnWindowDestroying(aura::Window* window) override; |
| 67 | 66 |
| 68 // ui::EventSource: | |
| 69 ui::EventProcessor* GetEventProcessor() override; | |
| 70 | |
| 71 std::vector<AshWindowTreeHost*> mirroring_hosts_; | 67 std::vector<AshWindowTreeHost*> mirroring_hosts_; |
| 72 | 68 |
| 73 gfx::Rect bounds_; | 69 gfx::Rect bounds_; |
| 74 | 70 |
| 75 TransformerHelper transformer_helper_; | 71 TransformerHelper transformer_helper_; |
| 76 | 72 |
| 77 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostUnified); | 73 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostUnified); |
| 78 }; | 74 }; |
| 79 | 75 |
| 80 } // namespace ash | 76 } // namespace ash |
| 81 | 77 |
| 82 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ | 78 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
| OLD | NEW |