fix: draggable regions exclusively on BrowserViews (#26145)
This commit is contained in:
parent
760c4aeb3e
commit
7cdc42f43a
16 changed files with 139 additions and 68 deletions
|
@ -5,8 +5,12 @@
|
|||
#ifndef SHELL_BROWSER_UI_DRAG_UTIL_H_
|
||||
#define SHELL_BROWSER_UI_DRAG_UTIL_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "shell/common/api/api.mojom.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -19,6 +23,15 @@ void DragFileItems(const std::vector<base::FilePath>& files,
|
|||
const gfx::Image& icon,
|
||||
gfx::NativeView view);
|
||||
|
||||
std::vector<gfx::Rect> CalculateNonDraggableRegions(
|
||||
std::unique_ptr<SkRegion> draggable,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
// Convert draggable regions in raw format to SkRegion format.
|
||||
std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_UI_DRAG_UTIL_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue