holding_space_drag_util.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2020 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_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_DRAG_UTIL_H_
  5. #define ASH_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_DRAG_UTIL_H_
  6. #include <vector>
  7. namespace gfx {
  8. class ImageSkia;
  9. class Vector2d;
  10. } // namespace gfx
  11. namespace ash {
  12. class HoldingSpaceItemView;
  13. namespace holding_space_util {
  14. // Returns a drag image for the specified holding space item `views` and the
  15. // offset with which to position it. The drag image consists of a stacked
  16. // representation of the dragged items with the first item being stacked on top.
  17. // Note that the drag image will paint at most two items with an overflow badge
  18. // to represent the presence of additional drag items if necessary.
  19. void CreateDragImage(const std::vector<const HoldingSpaceItemView*>& views,
  20. gfx::ImageSkia* drag_image,
  21. gfx::Vector2d* drag_offset);
  22. } // namespace holding_space_util
  23. } // namespace ash
  24. #endif // ASH_SYSTEM_HOLDING_SPACE_HOLDING_SPACE_DRAG_UTIL_H_