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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h

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/browser_non_client_frame_view_mac.h
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
index a1f79c2d894e96d6127903c14e65b107f4470525..489fd5978dc1c134f94b53ccc0598c84af0da8b6 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_MAC_H_
#include "base/macros.h"
+#include "chrome/browser/ui/views/frame/avatar_button_manager.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView {
@@ -15,10 +16,12 @@ class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView {
~BrowserNonClientFrameViewMac() override;
// BrowserNonClientFrameView:
+ void OnBrowserViewInitViewsComplete() override;
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
int GetTopInset(bool restored) const override;
int GetThemeBackgroundXInset() const override;
void UpdateThrobber(bool running) override;
+ views::View* GetProfileSwitcherView() const override;
// views::NonClientFrameView:
gfx::Rect GetBoundsForClientView() const override;
@@ -37,14 +40,25 @@ class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView {
protected:
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
+ void Layout() override;
+
+ // views::ViewTargeterDelegate:
+ bool DoesIntersectRect(const View* target,
+ const gfx::Rect& rect) const override;
// BrowserNonClientFrameView:
void UpdateProfileIcons() override;
private:
+ // Distance between the right edge of the frame and the tab strip.
+ int GetTabStripRightInset() const;
+
void PaintThemedFrame(gfx::Canvas* canvas);
void PaintToolbarBackground(gfx::Canvas* canvas);
+ // Wrapper around the in-frame avatar switcher.
+ AvatarButtonManager profile_switcher_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewMac);
};

Powered by Google App Engine
This is Rietveld 408576698