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

Unified Diff: chrome/browser/ui/views/frame/opaque_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
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_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/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 3f37851ab23ce879f9269933369078c357a143bb..adcd88eae224cbbf0ef8674f85a88bf41ecc74ee 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -188,24 +188,16 @@ gfx::Rect OpaqueBrowserFrameView::GetWindowBoundsForClientBounds(
bool OpaqueBrowserFrameView::IsWithinAvatarMenuButtons(
const gfx::Point& point) const {
- if (profile_indicator_icon() &&
- profile_indicator_icon()->GetMirroredBounds().Contains(point)) {
- return true;
- }
- if (profile_switcher_.view() &&
- profile_switcher_.view()->GetMirroredBounds().Contains(point)) {
- return true;
- }
-
- return false;
+ return profile_indicator_icon() &&
+ profile_indicator_icon()->GetMirroredBounds().Contains(point);
}
int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
if (!bounds().Contains(point))
return HTNOWHERE;
- // See if the point is within the avatar menu button.
- if (IsWithinAvatarMenuButtons(point))
+ // See if the point is within the avatar menu button or profile switcher.
+ if (profile_switcher_.HitTest(point) || IsWithinAvatarMenuButtons(point))
return HTCLIENT;
int frame_component = frame()->client_view()->NonClientHitTest(point);
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698