ash_window_tree_host_mirroring_unified.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2017 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_MIRRORING_UNIFIED_H_
  5. #define ASH_HOST_ASH_WINDOW_TREE_HOST_MIRRORING_UNIFIED_H_
  6. #include "ash/host/ash_window_tree_host_platform.h"
  7. namespace ash {
  8. class AshWindowTreeHostDelegate;
  9. // A window tree host for the mirroing displays that constitute the unified
  10. // desktop. This correctly handles coordinates conversion from DIP to pixels and
  11. // vice versa.
  12. class AshWindowTreeHostMirroringUnified : public AshWindowTreeHostPlatform {
  13. public:
  14. AshWindowTreeHostMirroringUnified(const gfx::Rect& initial_bounds,
  15. int64_t mirroring_display_id,
  16. AshWindowTreeHostDelegate* delegate);
  17. AshWindowTreeHostMirroringUnified(const AshWindowTreeHostMirroringUnified&) =
  18. delete;
  19. AshWindowTreeHostMirroringUnified& operator=(
  20. const AshWindowTreeHostMirroringUnified&) = delete;
  21. ~AshWindowTreeHostMirroringUnified() override;
  22. // aura::WindowTreeHost:
  23. gfx::Transform GetRootTransformForLocalEventCoordinates() const override;
  24. void ConvertDIPToPixels(gfx::PointF* point) const override;
  25. void ConvertPixelsToDIP(gfx::PointF* point) const override;
  26. // ash::AshWindowTreeHostPlatform:
  27. void PrepareForShutdown() override;
  28. // ui::PlatformWindowDelegate:
  29. void OnMouseEnter() override;
  30. private:
  31. int64_t mirroring_display_id_;
  32. bool is_shutting_down_ = false;
  33. };
  34. } // namespace ash
  35. #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_MIRRORING_UNIFIED_H_