Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: ash/wm/frame_painter.cc

Issue 9706044: Ash: Extend tabs to top of window for maximized windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just push tabs to top Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/wm/frame_painter.cc
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index f61baad1ada3c10ee0fa60a62eea9e64aef88d7b..d9e72ab6dc1e66c8be539a528d124a3e03589131 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -23,8 +23,6 @@
#include "ui/views/widget/widget_delegate.h"
namespace {
-// Size of border along top edge, used for resize handle computations.
-const int kTopThickness = 1;
// TODO(jamescook): Border is specified to be a single pixel overlapping
// the web content and may need to be built into the shadow layers instead.
const int kBorderThickness = 0;
@@ -175,15 +173,18 @@ int FramePainter::NonClientHitTest(views::NonClientFrameView* view,
// Check the frame first, as we allow a small area overlapping the contents
// to be used for resize handles.
- bool can_resize = frame_->widget_delegate() ?
+ bool can_ever_resize = frame_->widget_delegate() ?
frame_->widget_delegate()->CanResize() :
false;
+ // Don't allow overlapping resize handles when the window is maximized, as it
+ // can't be resized in that state.
+ int resize_border = frame_->IsMaximized() ? 0 : kResizeInsideBoundsSize;
int frame_component = view->GetHTComponentForFrame(point,
- kResizeInsideBoundsSize,
- kResizeInsideBoundsSize,
+ resize_border,
+ resize_border,
kResizeAreaCornerSize,
kResizeAreaCornerSize,
- can_resize);
+ can_ever_resize);
if (frame_component != HTNOWHERE)
return frame_component;

Powered by Google App Engine
This is Rietveld 408576698