refactor: move draggable regions to WebContents (#36230)

This commit is contained in:
Jeremy Rose 2022-11-07 10:15:57 -08:00 committed by GitHub
parent 2008c9a5d0
commit 184ac2b382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 96 additions and 202 deletions

View file

@ -41,10 +41,6 @@ class InspectableWebContentsView {
}
InspectableWebContentsViewDelegate* GetDelegate() const { return delegate_; }
const std::vector<mojom::DraggableRegionPtr>& GetDraggableRegions() const {
return draggable_regions_;
}
#if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC)
// Returns the container control, which has devtools view attached.
virtual views::View* GetView() = 0;
@ -66,16 +62,10 @@ class InspectableWebContentsView {
const DevToolsContentsResizingStrategy& strategy) = 0;
virtual void SetTitle(const std::u16string& title) = 0;
// Called when the window needs to update its draggable region.
virtual void UpdateDraggableRegions(
const std::vector<mojom::DraggableRegionPtr>& regions) = 0;
protected:
// Owns us.
InspectableWebContents* inspectable_web_contents_;
std::vector<mojom::DraggableRegionPtr> draggable_regions_;
private:
InspectableWebContentsViewDelegate* delegate_ = nullptr; // weak references.
};