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

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

Issue 19115003: Make the maximize button more easily hittable when there is a huge amount of tabs present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/browser_view.cc ('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/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index a015739735db702a0e7db047c136ab4075dffc7f..04d1028c25aec967579e86e5cf1c3ec7834ffb3f 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -249,13 +249,25 @@ gfx::Rect BrowserViewLayout::GetFindBarBoundingBox() const {
bool BrowserViewLayout::IsPositionInWindowCaption(
const gfx::Point& point) {
- // Tab strip may transiently have no parent between the RemoveChildView() and
- // AddChildView() caused by reparenting during an immersive mode reveal.
- // During this window report that the point didn't hit a tab.
- if (!tab_strip_->parent())
- return true;
+ views::View* window_switcher_button = delegate_->GetWindowSwitcherButton();
+ if (window_switcher_button) {
+ gfx::Point window_switcher_point(point);
+ views::View::ConvertPointToTarget(browser_view_, window_switcher_button,
+ &window_switcher_point);
+ if (window_switcher_button->HitTestPoint(window_switcher_point))
+ return false;
+ }
+
gfx::Point tabstrip_point(point);
views::View::ConvertPointToTarget(browser_view_, tab_strip_, &tabstrip_point);
+
+ // NonClientFrameView::HitTestRect() should have filtered out any points
+ // below |tab_strip_|.
+ DCHECK_LE(point.y(), tab_strip_->bounds().bottom());
+
+ // The window controls are in the non client view.
+ if (!tab_strip_->HitTestPoint(tabstrip_point))
James Cook 2013/07/12 23:12:12 Is there some other way to do this? In particular
+ return true;
return tab_strip_->IsPositionInWindowCaption(tabstrip_point);
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698