OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
| 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ash/host/ash_window_tree_host.h" |
| 11 #include "ui/aura/window_observer.h" |
| 12 #include "ui/aura/window_tree_host.h" |
| 13 #include "ui/events/event_source.h" |
| 14 #include "ui/gfx/geometry/rect.h" |
| 15 |
| 16 namespace ui { |
| 17 class Reflector; |
| 18 } |
| 19 |
| 20 namespace ash { |
| 21 class DisplayInfo; |
| 22 |
| 23 // A WTH used for unified desktop mode. This creates an offscreen |
| 24 // compositor whose texture will be copied into each displays' |
| 25 // compositor. |
| 26 class AshWindowTreeHostUnified : public AshWindowTreeHost, |
| 27 public aura::WindowTreeHost, |
| 28 public aura::WindowObserver, |
| 29 public ui::EventSource { |
| 30 public: |
| 31 explicit AshWindowTreeHostUnified(const gfx::Rect& initial_bounds); |
| 32 ~AshWindowTreeHostUnified() override; |
| 33 |
| 34 private: |
| 35 // AshWindowTreeHost: |
| 36 void ToggleFullScreen() override; |
| 37 bool ConfineCursorToRootWindow() override; |
| 38 void UnConfineCursor() override; |
| 39 void SetRootWindowTransformer( |
| 40 scoped_ptr<RootWindowTransformer> transformer) override; |
| 41 gfx::Insets GetHostInsets() const override; |
| 42 aura::WindowTreeHost* AsWindowTreeHost() override; |
| 43 void PrepareForShutdown() override; |
| 44 void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) override; |
| 45 |
| 46 // aura::WindowTreeHost: |
| 47 ui::EventSource* GetEventSource() override; |
| 48 gfx::AcceleratedWidget GetAcceleratedWidget() override; |
| 49 void Show() override; |
| 50 void Hide() override; |
| 51 gfx::Rect GetBounds() const override; |
| 52 void SetBounds(const gfx::Rect& bounds) override; |
| 53 void SetCapture() override; |
| 54 void ReleaseCapture() override; |
| 55 gfx::Point GetLocationOnNativeScreen() const override; |
| 56 void SetCursorNative(gfx::NativeCursor cursor) override; |
| 57 void MoveCursorToNative(const gfx::Point& location) override; |
| 58 void OnCursorVisibilityChangedNative(bool show) override; |
| 59 |
| 60 // aura::WindowObserver: |
| 61 void OnWindowDestroying(aura::Window* window) override; |
| 62 |
| 63 // ui::EventSource: |
| 64 ui::EventProcessor* GetEventProcessor() override; |
| 65 |
| 66 std::vector<AshWindowTreeHost*> mirroring_hosts_; |
| 67 |
| 68 gfx::Rect bounds_; |
| 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostUnified); |
| 71 }; |
| 72 |
| 73 } // namespace ash |
| 74 |
| 75 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_ |
OLD | NEW |