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

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

Issue 355233002: Fix build when ENABLE_MANAGED_USERS is not defined (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More bauerb comments Created 6 years, 5 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/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..0cdb01d7f62e6f73f8da8df592660336c5372df7 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,16 @@ 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))))
+ avatar_button()->GetMirroredBounds().Contains(point))))
return HTCLIENT;
Bernhard Bauer 2014/07/21 08:55:15 This should be only two spaces indented; sorry I m
mckev 2014/08/05 01:09:14 No problem. I made the change above as well.
+#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.

Powered by Google App Engine
This is Rietveld 408576698