drag_util.h 948 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2016 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_
  5. #define ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_
  6. #include <memory>
  7. #include <vector>
  8. #include "electron/shell/common/api/api.mojom.h"
  9. #include "third_party/blink/public/mojom/page/draggable_region.mojom-forward.h"
  10. #include "third_party/skia/include/core/SkRegion.h"
  11. #include "ui/gfx/image/image.h"
  12. namespace base {
  13. class FilePath;
  14. }
  15. namespace electron {
  16. void DragFileItems(const std::vector<base::FilePath>& files,
  17. const gfx::Image& icon,
  18. gfx::NativeView view);
  19. // Convert draggable regions in raw format to SkRegion format.
  20. std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
  21. const std::vector<blink::mojom::DraggableRegionPtr>& regions);
  22. } // namespace electron
  23. #endif // ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_