@@ -606,42 +606,23 @@ void NativeWindowWin::OnViewWasResized() {
606606 DCHECK (web_view_);
607607 gfx::Size sz = web_view_->size ();
608608 int height = sz.height (), width = sz.width ();
609- int radius = 1 ;
610609 gfx::Path path;
611- if (window_->IsMaximized () || window_->IsFullscreen ()) {
612- // Don't round the corners when the window is maximized or fullscreen.
613- path.addRect (0 , 0 , width, height);
614- } else {
615- if (!has_frame ()) {
616- path.moveTo (0 , radius);
617- path.lineTo (radius, 0 );
618- path.lineTo (width - radius, 0 );
619- path.lineTo (width, radius);
620- } else {
621- // Don't round the top corners in chrome-style frame mode.
622- path.moveTo (0 , 0 );
623- path.lineTo (width, 0 );
624- }
625- path.lineTo (width, height - radius - 1 );
626- path.lineTo (width - radius - 1 , height);
627- path.lineTo (radius + 1 , height);
628- path.lineTo (0 , height - radius - 1 );
629- path.close ();
630- }
610+ path.addRect (0 , 0 , width, height);
631611 SetWindowRgn (web_contents ()->GetNativeView (), path.CreateNativeRegion (), 1 );
632612
633613 SkRegion* rgn = new SkRegion;
634614 if (!window_->IsFullscreen ()) {
635615 if (draggable_region ())
636616 rgn->op (*draggable_region (), SkRegion::kUnion_Op );
637617 if (!window_->IsMaximized ()) {
638- if (!has_frame ())
618+ if (!has_frame ()) {
639619 rgn->op (0 , 0 , width, kResizeInsideBoundsSize , SkRegion::kUnion_Op );
640- rgn->op (0 , 0 , kResizeInsideBoundsSize , height, SkRegion::kUnion_Op );
641- rgn->op (width - kResizeInsideBoundsSize , 0 , width, height,
642- SkRegion::kUnion_Op );
643- rgn->op (0 , height - kResizeInsideBoundsSize , width, height,
644- SkRegion::kUnion_Op );
620+ rgn->op (0 , 0 , kResizeInsideBoundsSize , height, SkRegion::kUnion_Op );
621+ rgn->op (width - kResizeInsideBoundsSize , 0 , width, height,
622+ SkRegion::kUnion_Op );
623+ rgn->op (0 , height - kResizeInsideBoundsSize , width, height,
624+ SkRegion::kUnion_Op );
625+ }
645626 }
646627 }
647628 if (web_contents ()->GetRenderViewHost ()->GetView ())
0 commit comments