mac: Move draggable region code to BrowserWindow

On macOS current draggable region implementation highly relies on
WebContents, the code is only meaningful for BrowserWindow.
This commit is contained in:
Cheng Zhao 2018-03-06 14:44:36 +09:00
parent bc34ca9e25
commit 503b0ba1b1
10 changed files with 127 additions and 132 deletions

View file

@ -221,10 +221,6 @@ class NativeWindow : public base::SupportsUserData,
virtual gfx::Rect WindowBoundsToContentBounds(
const gfx::Rect& bounds) const = 0;
// Called when the window needs to update its draggable region.
virtual void UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) = 0;
base::WeakPtr<NativeWindow> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
@ -304,11 +300,6 @@ class NativeWindow : public base::SupportsUserData,
const mate::Dictionary& options,
NativeWindow* parent);
// Convert draggable regions in raw format to SkRegion format. Caller is
// responsible for deleting the returned SkRegion instance.
std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
const std::vector<DraggableRegion>& regions);
private:
// Whether window has standard frame.
bool has_frame_;