Commit df3e1592 authored by John Smith's avatar John Smith Committed by Commit Bot

Remove the code for detecting changes in custom state

ShouldCustomDrawSystemTitlebar will never change during the runtime of
the browser now so these checks are unnecessary.

Bug: 953982
Change-Id: Icc9e8201a0e23fe0eab9cfe62d1a9d2a2290af88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108128Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751220}
parent 18675642
...@@ -1735,12 +1735,6 @@ void BrowserView::UserChangedTheme(BrowserThemeChangeType theme_change_type) { ...@@ -1735,12 +1735,6 @@ void BrowserView::UserChangedTheme(BrowserThemeChangeType theme_change_type) {
must_regenerate_frame |= must_regenerate_frame |=
theme_change_type == BrowserThemeChangeType::kBrowserTheme && theme_change_type == BrowserThemeChangeType::kBrowserTheme &&
!IsFullscreen(); !IsFullscreen();
// TODO(https://crbug.com/953982): Remove the need to regenerate the frame
const bool should_use_custom_titlebar = ShouldCustomDrawSystemTitlebar();
must_regenerate_frame |=
(using_custom_titlebar_ != should_use_custom_titlebar);
#else #else
must_regenerate_frame |= must_regenerate_frame |=
theme_change_type == BrowserThemeChangeType::kBrowserTheme; theme_change_type == BrowserThemeChangeType::kBrowserTheme;
...@@ -1756,10 +1750,6 @@ void BrowserView::UserChangedTheme(BrowserThemeChangeType theme_change_type) { ...@@ -1756,10 +1750,6 @@ void BrowserView::UserChangedTheme(BrowserThemeChangeType theme_change_type) {
GetWidget()->ThemeChanged(); GetWidget()->ThemeChanged();
} }
using_native_frame_ = should_use_native_frame; using_native_frame_ = should_use_native_frame;
#if defined(OS_WIN)
using_custom_titlebar_ = should_use_custom_titlebar;
#endif
} }
void BrowserView::ShowAppMenu() { void BrowserView::ShowAppMenu() {
......
...@@ -807,12 +807,6 @@ class BrowserView : public BrowserWindow, ...@@ -807,12 +807,6 @@ class BrowserView : public BrowserWindow,
// True if (as of the last time it was checked) the frame type is native. // True if (as of the last time it was checked) the frame type is native.
bool using_native_frame_ = true; bool using_native_frame_ = true;
#if defined(OS_WIN)
// True if (as of the last time it was checked) we're using a custom drawn
// title bar.
bool using_custom_titlebar_ = true;
#endif
// True when in ProcessFullscreen(). The flag is used to avoid reentrance and // True when in ProcessFullscreen(). The flag is used to avoid reentrance and
// to ignore requests to layout while in ProcessFullscreen() to reduce // to ignore requests to layout while in ProcessFullscreen() to reduce
// jankiness. // jankiness.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment