diff --git a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native_unittest.cc b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native_unittest.cc index 6c9b2042739612..42c3fa63ecf3c5 100644 --- a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native_unittest.cc +++ b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native_unittest.cc @@ -65,6 +65,7 @@ class TestLayoutDelegate : public OpaqueBrowserFrameViewLayoutDelegate { bool IsMinimized() const override { return false; } bool IsFullscreen() const override { return false; } bool IsTabStripVisible() const override { return true; } + bool GetBorderlessModeEnabled() const override { return false; } int GetTabStripHeight() const override { return GetLayoutConstant(TAB_HEIGHT); } diff --git a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_unittest.cc b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_unittest.cc index c553baa37baf40..413ae40702e208 100644 --- a/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_unittest.cc +++ b/chrome/browser/ui/views/frame/browser_frame_view_layout_linux_unittest.cc @@ -34,6 +34,7 @@ class TestLayoutDelegate : public OpaqueBrowserFrameViewLayoutDelegate { bool IsMinimized() const override { return false; } bool IsFullscreen() const override { return false; } bool IsTabStripVisible() const override { return true; } + bool GetBorderlessModeEnabled() const override { return false; } int GetTabStripHeight() const override { return GetLayoutConstant(TAB_HEIGHT); } diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 429dfc060b5ae1..bc22da820add3d 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -546,6 +546,10 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { return browser_view_->GetTabStripVisible(); } + bool GetBorderlessModeEnabled() const override { + return browser_view_->IsBorderlessModeEnabled(); + } + gfx::Rect GetBoundsForTabStripRegionInBrowserView() const override { const gfx::Size tabstrip_minimum_size = browser_view_->tab_strip_region_view()->GetMinimumSize(); diff --git a/chrome/browser/ui/views/frame/browser_view_layout_delegate.h b/chrome/browser/ui/views/frame/browser_view_layout_delegate.h index 65b78d26dd5ef3..94d015c16ee82e 100644 --- a/chrome/browser/ui/views/frame/browser_view_layout_delegate.h +++ b/chrome/browser/ui/views/frame/browser_view_layout_delegate.h @@ -21,6 +21,7 @@ class BrowserViewLayoutDelegate { virtual ~BrowserViewLayoutDelegate() {} virtual bool IsTabStripVisible() const = 0; + virtual bool GetBorderlessModeEnabled() const = 0; virtual gfx::Rect GetBoundsForTabStripRegionInBrowserView() const = 0; virtual int GetTopInsetInBrowserView() const = 0; virtual int GetThemeBackgroundXInset() const = 0; diff --git a/chrome/browser/ui/views/frame/browser_view_layout_unittest.cc b/chrome/browser/ui/views/frame/browser_view_layout_unittest.cc index b3d4e1fc1b2658..94baa1f839969f 100644 --- a/chrome/browser/ui/views/frame/browser_view_layout_unittest.cc +++ b/chrome/browser/ui/views/frame/browser_view_layout_unittest.cc @@ -60,6 +60,7 @@ class MockBrowserViewLayoutDelegate : public BrowserViewLayoutDelegate { // BrowserViewLayout::Delegate overrides: bool IsTabStripVisible() const override { return tab_strip_visible_; } + bool GetBorderlessModeEnabled() const override { return false; } gfx::Rect GetBoundsForTabStripRegionInBrowserView() const override { return gfx::Rect(); } diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc index fcca38bb9286f1..962805dc68a9ad 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -511,6 +511,10 @@ bool OpaqueBrowserFrameView::IsTabStripVisible() const { return browser_view()->GetTabStripVisible(); } +bool OpaqueBrowserFrameView::GetBorderlessModeEnabled() const { + return browser_view()->IsBorderlessModeEnabled(); +} + bool OpaqueBrowserFrameView::IsToolbarVisible() const { return browser_view()->IsToolbarVisible() && !browser_view()->toolbar()->GetPreferredSize().IsEmpty(); diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h index 39221a2e8252d1..578e474bae1950 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h @@ -100,6 +100,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView, bool IsMinimized() const override; bool IsFullscreen() const override; bool IsTabStripVisible() const override; + bool GetBorderlessModeEnabled() const override; int GetTabStripHeight() const override; bool IsToolbarVisible() const override; gfx::Size GetTabstripMinimumSize() const override; diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h index a076750704236a..ee3c4e3a4d75d1 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h @@ -59,6 +59,7 @@ class OpaqueBrowserFrameViewLayoutDelegate { virtual bool IsMaximized() const = 0; virtual bool IsMinimized() const = 0; virtual bool IsFullscreen() const = 0; + virtual bool GetBorderlessModeEnabled() const = 0; virtual bool IsTabStripVisible() const = 0; virtual int GetTabStripHeight() const = 0; diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc index 0f607b2130b4a0..96f6bfb57a96bd 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc @@ -75,6 +75,7 @@ class TestLayoutDelegate : public OpaqueBrowserFrameViewLayoutDelegate { bool IsMinimized() const override { return false; } bool IsFullscreen() const override { return false; } bool IsTabStripVisible() const override { return window_title_.empty(); } + bool GetBorderlessModeEnabled() const override { return false; } int GetTabStripHeight() const override { return IsTabStripVisible() ? GetLayoutConstant(TAB_HEIGHT) : 0; }