shaped_window_targeter.cc 732 B

123456789101112131415161718192021222324
  1. // Copyright 2018 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. #include "ash/keyboard/ui/shaped_window_targeter.h"
  5. #include <utility>
  6. #include "ui/gfx/geometry/rect.h"
  7. namespace keyboard {
  8. ShapedWindowTargeter::ShapedWindowTargeter(
  9. std::vector<gfx::Rect> hit_test_rects)
  10. : hit_test_rects_(std::move(hit_test_rects)) {}
  11. ShapedWindowTargeter::~ShapedWindowTargeter() = default;
  12. std::unique_ptr<aura::WindowTargeter::HitTestRects>
  13. ShapedWindowTargeter::GetExtraHitTestShapeRects(aura::Window* target) const {
  14. return std::make_unique<aura::WindowTargeter::HitTestRects>(hit_test_rects_);
  15. }
  16. } // namespace keyboard