| 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 947622c4bbf6d54027ee96fa2b8595998d81cf5d..df4da947a33dbce684f3443b9b631008cbb7d783 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
|
| @@ -19,7 +19,6 @@
|
| #include "chrome/browser/ui/views/frame/browser_header_painter_ash.h"
|
| #include "chrome/browser/ui/views/frame/browser_view.h"
|
| #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
|
| -#include "chrome/browser/ui/views/profiles/avatar_label.h"
|
| #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
|
| #include "chrome/browser/ui/views/tab_icon_view.h"
|
| #include "chrome/browser/ui/views/tabs/tab_strip.h"
|
| @@ -44,6 +43,10 @@
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/widget/widget_delegate.h"
|
|
|
| +#if defined(ENABLE_MANAGED_USERS)
|
| +#include "chrome/browser/ui/views/profiles/supervised_user_avatar_label.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| // The avatar ends 2 px above the bottom of the tabstrip (which, given the
|
| @@ -199,12 +202,18 @@ int BrowserNonClientFrameViewAsh::NonClientHitTest(const gfx::Point& point) {
|
| int hit_test = ash::FrameBorderHitTestController::NonClientHitTest(this,
|
| caption_button_container_, point);
|
|
|
| - // See if the point is actually within the avatar menu button or within
|
| - // the avatar label.
|
| + // See if the point is actually within the avatar menu button.
|
| if (hit_test == HTCAPTION && ((avatar_button() &&
|
| - avatar_button()->GetMirroredBounds().Contains(point)) ||
|
| - (avatar_label() && avatar_label()->GetMirroredBounds().Contains(point))))
|
| - return HTCLIENT;
|
| + avatar_button()->GetMirroredBounds().Contains(point)))) {
|
| + return HTCLIENT;
|
| + }
|
| +#if defined(ENABLE_MANAGED_USERS)
|
| + // ...or within the avatar label, if it's a supervised user.
|
| + if ((supervised_user_avatar_label() &&
|
| + supervised_user_avatar_label()->GetMirroredBounds().Contains(point))) {
|
| + return HTCLIENT;
|
| + }
|
| +#endif
|
|
|
| // 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.
|
|
|