Index: chrome/browser/ui/views/frame/glass_browser_frame_view.h |
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.h b/chrome/browser/ui/views/frame/glass_browser_frame_view.h |
index 8b0ad07cd6475aa4dbbeb5512a5421fd3060b860..3eb2cf18b3e481b577eb23df32cc72114edd068c 100644 |
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.h |
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.h |
@@ -13,6 +13,8 @@ |
#include "chrome/browser/ui/views/frame/windows_10_caption_button.h" |
#include "chrome/browser/ui/views/tab_icon_view.h" |
#include "chrome/browser/ui/views/tab_icon_view_model.h" |
+#include "chrome/browser/ui/views/tabs/tab_strip.h" |
+#include "chrome/browser/ui/views/tabs/tab_strip_observer.h" |
#include "ui/views/controls/button/button.h" |
#include "ui/views/window/non_client_view.h" |
@@ -20,7 +22,8 @@ class BrowserView; |
class GlassBrowserFrameView : public BrowserNonClientFrameView, |
public views::ButtonListener, |
- public TabIconViewModel { |
+ public TabIconViewModel, |
+ public TabStripObserver { |
public: |
// Constructs a non-client view for an BrowserFrame. |
GlassBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); |
@@ -32,7 +35,8 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, |
int GetThemeBackgroundXInset() const override; |
void UpdateThrobber(bool running) override; |
gfx::Size GetMinimumSize() const override; |
- views::View* GetProfileSwitcherView() const override; |
+ views::MenuButton* GetProfileSwitcherButton() const override; |
+ void OnBrowserViewInitViewsComplete() override; |
// views::NonClientFrameView: |
gfx::Rect GetBoundsForClientView() const override; |
@@ -73,6 +77,11 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, |
bool DoesIntersectRect(const views::View* target, |
const gfx::Rect& rect) const override; |
+ // TabStripObserver: |
+ void TabStripMaxXChanged(TabStrip* tab_strip) override; |
+ void TabStripDeleted(TabStrip* tab_strip) override; |
+ void TabStripRemovedTabAt(TabStrip* tab_strip, int index) override; |
+ |
// Returns the thickness of the border around the client area (web content, |
// toolbar, and tabs) that separates it from the frame border. If |restored| |
// is true, this is calculated as if the window was restored, regardless of |
@@ -158,6 +167,11 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, |
// Displays the next throbber frame. |
void DisplayNextThrobberFrame(); |
+ // If --force-device-scale-factor is specified adjusts the specified height, |
+ // so that when it is scaled to the forced factor the result is the same as |
+ // without the forced scaling. |
+ void AdjustForForcedDisplayScaleFactor(int* height) const; |
+ |
// The layout rect of the incognito icon, if visible. |
gfx::Rect incognito_bounds_; |
@@ -189,6 +203,9 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, |
// The index of the current frame of the throbber animation. |
int throbber_frame_; |
+ // Tab strip to watch for changes to resize the avatar button. |
+ TabStrip* tab_strip_; |
+ |
static const int kThrobberIconCount = 24; |
static HICON throbber_icons_[kThrobberIconCount]; |
static void InitThrobberIcons(); |