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

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

Issue 1780333006: Check for null |tabstrip_| in BrowserView::IsTabStripVisible() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only change Ash/Mus Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 7904459102dd2beec0efd228970f59c3c0736c85..208b5c3e5b3f78436a2d50ec293a1b9345bad9aa 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -400,14 +400,15 @@ bool BrowserNonClientFrameViewAsh::DoesIntersectRect(
return false;
}
- TabStrip* tabstrip = browser_view()->tabstrip();
- if (!tabstrip || !browser_view()->IsTabStripVisible()) {
+ if (!browser_view()->IsTabStripVisible()) {
// Claim |rect| if it is above the top of the topmost client area view.
return rect.y() < GetTopInset(false);
}
- // Claim |rect| if it is above the bottom of the tabstrip in a non-tab
- // portion.
+ // Claim |rect| only if it is above the bottom of the tabstrip in a non-tab
+ // portion. In particular, the avatar label/button is left of the tabstrip and
+ // the window controls are right of the tabstrip.
+ TabStrip* tabstrip = browser_view()->tabstrip();
gfx::RectF rect_in_tabstrip_coords_f(rect);
View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f);
const gfx::Rect rect_in_tabstrip_coords(
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698