cast_window_tree_host_aura.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2019 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 CHROMECAST_GRAPHICS_CAST_WINDOW_TREE_HOST_AURA_H_
  5. #define CHROMECAST_GRAPHICS_CAST_WINDOW_TREE_HOST_AURA_H_
  6. #include "ui/aura/window_tree_host_platform.h"
  7. namespace chromecast {
  8. // An aura::WindowTreeHost that correctly converts input events.
  9. class CastWindowTreeHostAura : public aura::WindowTreeHostPlatform {
  10. public:
  11. CastWindowTreeHostAura(bool enable_input,
  12. ui::PlatformWindowInitProperties properties);
  13. CastWindowTreeHostAura(const CastWindowTreeHostAura&) = delete;
  14. CastWindowTreeHostAura& operator=(const CastWindowTreeHostAura&) = delete;
  15. ~CastWindowTreeHostAura() override;
  16. // aura::WindowTreeHostPlatform implementation:
  17. void DispatchEvent(ui::Event* event) override;
  18. // aura::WindowTreeHost implementation
  19. gfx::Rect GetTransformedRootWindowBoundsFromPixelSize(
  20. const gfx::Size& size_in_pixels) const override;
  21. private:
  22. const bool enable_input_;
  23. };
  24. } // namespace chromecast
  25. #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_TREE_HOST_AURA_H_