diff --git a/browser/native_window_win.cc b/browser/native_window_win.cc index a3589158abea..63c27d57e2d3 100644 --- a/browser/native_window_win.cc +++ b/browser/native_window_win.cc @@ -223,6 +223,26 @@ gfx::NativeWindow NativeWindowWin::GetNativeWindow() { void NativeWindowWin::UpdateDraggableRegions( const std::vector& regions) { + if (has_frame_) + return; + + SkRegion* draggable_region = new SkRegion; + + // By default, the whole window is non-draggable. We need to explicitly + // include those draggable regions. + for (std::vector::const_iterator iter = + regions.begin(); + iter != regions.end(); ++iter) { + const extensions::DraggableRegion& region = *iter; + draggable_region->op( + region.bounds.x(), + region.bounds.y(), + region.bounds.right(), + region.bounds.bottom(), + region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); + } + + draggable_region_.reset(draggable_region); } void NativeWindowWin::HandleKeyboardEvent( diff --git a/browser/native_window_win.h b/browser/native_window_win.h index 19d9a5552997..87f52231648f 100644 --- a/browser/native_window_win.h +++ b/browser/native_window_win.h @@ -60,6 +60,8 @@ class NativeWindowWin : public NativeWindow, virtual bool IsKiosk() OVERRIDE; virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; + SkRegion* draggable_region() { return draggable_region_.get(); } + protected: virtual void UpdateDraggableRegions( const std::vector& regions) OVERRIDE; @@ -85,6 +87,8 @@ class NativeWindowWin : public NativeWindow, scoped_ptr window_; views::WebView* web_view_; // managed by window_. + scoped_ptr draggable_region_; + bool resizable_; string16 title_; gfx::Size minimum_size_; diff --git a/vendor/apm b/vendor/apm index 613d15242ac2..2c9da12d10e0 160000 --- a/vendor/apm +++ b/vendor/apm @@ -1 +1 @@ -Subproject commit 613d15242ac2286eafbfe19e3857580b8adeec8c +Subproject commit 2c9da12d10e0f8bbcf53bbfbd553ea2cdcb9b02a