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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 1632123004: Remove opaque-frame-only code to reduce top resize border size by 1 px. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/ui/views/frame/opaque_browser_frame_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 638bdd4b6a4f98646d89a9d6a679fa06dcc1e270..b2e82fd58d6975a100922f3ef2b2495a7ca1e036 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -61,13 +61,6 @@ using content::WebContents;
namespace {
-// While resize areas on Windows are normally the same size as the window
-// borders, our top area is shrunk by 1 px to make it easier to move the window
-// around with our thinner top grabbable strip. (Incidentally, our side and
-// bottom resize areas don't match the frame border thickness either -- they
-// span the whole nonclient area, so there's no "dead zone" for the mouse.)
-const int kTopResizeAdjust = 1;
-
// In the window corners, the resize areas don't actually expand bigger, but the
// 16 px at the end of each edge triggers diagonal resizing.
const int kResizeAreaCornerSize = 16;
@@ -253,9 +246,9 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
LOG(WARNING) << "delegate is null, returning safe default.";
return HTCAPTION;
}
- int window_component = GetHTComponentForFrame(point, TopResizeHeight(),
- NonClientBorderThickness(), kResizeAreaCornerSize, kResizeAreaCornerSize,
- delegate->CanResize());
+ int window_component = GetHTComponentForFrame(
+ point, FrameBorderThickness(false), NonClientBorderThickness(),
+ kResizeAreaCornerSize, kResizeAreaCornerSize, delegate->CanResize());
// Fall back to the caption if no other component matches.
return (window_component == HTNOWHERE) ? HTCAPTION : window_component;
}
@@ -555,10 +548,6 @@ int OpaqueBrowserFrameView::FrameBorderThickness(bool restored) const {
return layout_->FrameBorderThickness(restored);
}
-int OpaqueBrowserFrameView::TopResizeHeight() const {
- return FrameBorderThickness(false) - kTopResizeAdjust;
-}
-
int OpaqueBrowserFrameView::NonClientBorderThickness() const {
return layout_->NonClientBorderThickness();
}
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698