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

Unified Diff: chrome/views/custom_frame_window.cc

Issue 20161: Make aero glass code look more like other nonclient views in hopes of easing ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/views/frame/opaque_non_client_view.cc ('k') | chrome/views/non_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/custom_frame_window.cc
===================================================================
--- chrome/views/custom_frame_window.cc (revision 9393)
+++ chrome/views/custom_frame_window.cc (working copy)
@@ -243,7 +243,6 @@
// 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 @@
}
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 @@
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 @@
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) {
« no previous file with comments | « chrome/browser/views/frame/opaque_non_client_view.cc ('k') | chrome/views/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698