fix: draggable regions calculation in BrowserWindow/BrowserView (#26690)
This commit is contained in:
parent
4e3e3d414d
commit
acfbbe9869
5 changed files with 46 additions and 37 deletions
|
@ -40,6 +40,10 @@ class NativeBrowserView : public content::WebContentsObserver {
|
|||
return inspectable_web_contents_;
|
||||
}
|
||||
|
||||
const std::vector<mojom::DraggableRegionPtr>& GetDraggableRegions() const {
|
||||
return draggable_regions_;
|
||||
}
|
||||
|
||||
InspectableWebContentsView* GetInspectableWebContentsView();
|
||||
|
||||
virtual void SetAutoResizeFlags(uint8_t flags) = 0;
|
||||
|
@ -47,6 +51,9 @@ class NativeBrowserView : public content::WebContentsObserver {
|
|||
virtual gfx::Rect GetBounds() = 0;
|
||||
virtual void SetBackgroundColor(SkColor color) = 0;
|
||||
|
||||
virtual void UpdateDraggableRegions(
|
||||
const std::vector<gfx::Rect>& drag_exclude_rects) {}
|
||||
|
||||
// Called when the window needs to update its draggable region.
|
||||
virtual void UpdateDraggableRegions(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) {}
|
||||
|
@ -57,6 +64,7 @@ class NativeBrowserView : public content::WebContentsObserver {
|
|||
void WebContentsDestroyed() override;
|
||||
|
||||
InspectableWebContents* inspectable_web_contents_;
|
||||
std::vector<mojom::DraggableRegionPtr> draggable_regions_;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeBrowserView);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue