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 010e8aa1b3f4d2d7645f7c0dfc1dcc685c88984c..8609cde021c45a2f9960368af53af8f97cae42eb 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 |
@@ -9,6 +9,7 @@ |
#include "chrome/browser/themes/theme_properties.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/immersive_fullscreen_configuration.h" |
+#include "chrome/browser/ui/views/avatar_label.h" |
#include "chrome/browser/ui/views/avatar_menu_button.h" |
#include "chrome/browser/ui/views/frame/browser_frame.h" |
#include "chrome/browser/ui/views/frame/browser_view.h" |
@@ -154,6 +155,16 @@ gfx::Rect BrowserNonClientFrameViewAsh::GetWindowBoundsForClientBounds( |
int BrowserNonClientFrameViewAsh::NonClientHitTest(const gfx::Point& point) { |
int hit_test = frame_painter_->NonClientHitTest(this, point); |
+ |
+ if (hit_test == HTCAPTION) { |
+ // See if the point is actually within the avatar menu button or within |
+ // the avatar label. |
+ if ((avatar_button() && |
James Cook
2013/09/04 23:25:18
Consolidate this with the if() above
michaelpg
2013/09/05 02:42:45
Ok, how's this? Seems to be the least ugly way to
|
+ avatar_button()->GetMirroredBounds().Contains(point)) || |
+ (avatar_label() && avatar_label()->GetMirroredBounds().Contains(point))) |
+ return HTCLIENT; |
+ } |
+ |
// When the window is restored we want a large click target above the tabs |
// to drag the window, so redirect clicks in the tab's shadow to caption. |
if (hit_test == HTCLIENT && |