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

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

Issue 1529703003: [EXPERIMENT] [MacViews] Enable and handle the profile switcher. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 0f4d3c0a30efa47c425565dad427a1981bb679b9..59433aaaa91d1ddb78082ea7796918881ad61ef9 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -226,8 +226,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
// See if the point is within the incognito icon or the profile switcher menu.
if ((profile_indicator_icon() &&
profile_indicator_icon()->GetMirroredBounds().Contains(point)) ||
- (profile_switcher_.view() &&
- profile_switcher_.view()->GetMirroredBounds().Contains(point)))
+ profile_switcher_.HitTest(point))
return HTCLIENT;
int frame_component = frame()->client_view()->NonClientHitTest(point);
@@ -301,10 +300,7 @@ bool GlassBrowserFrameView::DoesIntersectRect(const views::View* target,
bool hit_incognito_icon =
profile_indicator_icon() &&
profile_indicator_icon()->GetMirroredBounds().Intersects(rect);
- bool hit_profile_switcher_button =
- profile_switcher_.view() &&
- profile_switcher_.view()->GetMirroredBounds().Intersects(rect);
- return hit_incognito_icon || hit_profile_switcher_button ||
+ return hit_incognito_icon || profile_switcher_.Intersects(rect) ||
!frame()->client_view()->bounds().Intersects(rect);
}

Powered by Google App Engine
This is Rietveld 408576698