ash_window_tree_host_unified.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_
  5. #define ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_
  6. #include <vector>
  7. #include "ash/host/ash_window_tree_host_platform.h"
  8. #include "ui/aura/window_observer.h"
  9. namespace ash {
  10. class AshWindowTreeHostDelegate;
  11. // A WTH used for unified desktop mode. This creates an offscreen
  12. // compositor whose texture will be copied into each displays'
  13. // compositor.
  14. class AshWindowTreeHostUnified : public AshWindowTreeHostPlatform,
  15. public aura::WindowObserver {
  16. public:
  17. AshWindowTreeHostUnified(const gfx::Rect& initial_bounds,
  18. AshWindowTreeHostDelegate* delegate,
  19. size_t compositor_memory_limit_mb = 0);
  20. AshWindowTreeHostUnified(const AshWindowTreeHostUnified&) = delete;
  21. AshWindowTreeHostUnified& operator=(const AshWindowTreeHostUnified&) = delete;
  22. ~AshWindowTreeHostUnified() override;
  23. private:
  24. // AshWindowTreeHost:
  25. void PrepareForShutdown() override;
  26. void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) override;
  27. void UpdateCursorConfig() override;
  28. void ClearCursorConfig() override;
  29. // aura::WindowTreeHost:
  30. void SetCursorNative(gfx::NativeCursor cursor) override;
  31. void OnCursorVisibilityChangedNative(bool show) override;
  32. // ui::PlatformWindow:
  33. void OnBoundsChanged(const BoundsChange& bounds) override;
  34. // aura::WindowObserver:
  35. void OnWindowDestroying(aura::Window* window) override;
  36. std::vector<AshWindowTreeHost*> mirroring_hosts_;
  37. };
  38. } // namespace ash
  39. #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_UNIFIED_H_