summaryrefslogtreecommitdiffstats
path: root/chrome/views/custom_frame_window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/custom_frame_window.cc')
-rw-r--r--chrome/views/custom_frame_window.cc19
1 files changed, 5 insertions, 14 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc
index 2cf6ccd..9dc3de7 100644
--- a/chrome/views/custom_frame_window.cc
+++ b/chrome/views/custom_frame_window.cc
@@ -243,7 +243,6 @@ class DefaultNonClientView : public NonClientView,
// View overrides:
virtual void Paint(ChromeCanvas* canvas);
virtual void Layout();
- virtual gfx::Size GetPreferredSize();
virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
// BaseButton::ButtonListener implementation:
@@ -451,8 +450,9 @@ CPoint DefaultNonClientView::GetSystemMenuPoint() const {
}
int DefaultNonClientView::NonClientHitTest(const gfx::Point& point) {
- // First see if it's within the grow box area, since that overlaps the client
- // bounds.
+ if (!bounds().Contains(point))
+ return HTNOWHERE;
+
int frame_component = container_->client_view()->NonClientHitTest(point);
if (frame_component != HTNOWHERE)
return frame_component;
@@ -474,11 +474,10 @@ int DefaultNonClientView::NonClientHitTest(const gfx::Point& point) {
return HTSYSMENU;
int window_component = GetHTComponentForFrame(point, FrameBorderThickness(),
- NonClientBorderThickness(), kResizeAreaCornerSize,
+ NonClientBorderThickness(), kResizeAreaCornerSize, kResizeAreaCornerSize,
container_->window_delegate()->CanResize());
// Fall back to the caption if no other component matches.
- return ((window_component == HTNOWHERE) && bounds().Contains(point)) ?
- HTCAPTION : window_component;
+ return (window_component == HTNOWHERE) ? HTCAPTION : window_component;
}
void DefaultNonClientView::GetWindowMask(const gfx::Size& size,
@@ -534,14 +533,6 @@ void DefaultNonClientView::Layout() {
LayoutClientView();
}
-gfx::Size DefaultNonClientView::GetPreferredSize() {
- gfx::Size prefsize(container_->client_view()->GetPreferredSize());
- int border_thickness = NonClientBorderThickness();
- prefsize.Enlarge(2 * border_thickness,
- NonClientTopBorderHeight() + border_thickness);
- return prefsize;
-}
-
void DefaultNonClientView::ViewHierarchyChanged(bool is_add,
View* parent,
View* child) {