Commit d7f85be5 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Badge teleported windows in Refresh on ChromeOS

Adds back parts of ShouldShowProfileIndicatorIcon on ChromeOS under
Refresh. This indicator should now show under Refresh but only for
teleported browser windows.

Bug: chromium:834524
Change-Id: I40e4233f2ffdf6df3f07ee6b0cc41e9d5b5f6a9a
Reviewed-on: https://chromium-review.googlesource.com/1105278
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568247}
parent 2640f0a9
...@@ -509,21 +509,23 @@ void BrowserNonClientFrameView::UpdateTaskbarDecoration() { ...@@ -509,21 +509,23 @@ void BrowserNonClientFrameView::UpdateTaskbarDecoration() {
} }
bool BrowserNonClientFrameView::ShouldShowProfileIndicatorIcon() const { bool BrowserNonClientFrameView::ShouldShowProfileIndicatorIcon() const {
// In Material Refresh, we use a toolbar button for all #if !defined(OS_CHROMEOS)
// profile/incognito-related purposes. // Outside ChromeOS, in Material Refresh, we use a toolbar button for all
// profile/incognito-related purposes. ChromeOS uses it for teleportation (see
// below).
if (MD::IsRefreshUi()) if (MD::IsRefreshUi())
return false; return false;
#endif // !defined(OS_CHROMEOS)
Browser* browser = browser_view()->browser(); Browser* browser = browser_view()->browser();
Profile* profile = browser->profile(); Profile* profile = browser->profile();
const bool is_incognito = const bool is_incognito =
profile->GetProfileType() == Profile::INCOGNITO_PROFILE; profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
// In the touch-optimized UI, we don't show the incognito icon in the browser // In newer material UIs we only show the avatar icon for the teleported
// frame. It's instead shown in the new tab button. However, we still show an // browser windows between multi-user sessions (Chrome OS only). Note that you
// avatar icon for the teleported browser windows between multi-user sessions // can't teleport an incognito window.
// (Chrome OS only). Note that you can't teleport an incognito window. if (is_incognito && MD::IsNewerMaterialUi())
if (is_incognito && MD::IsTouchOptimizedUiEnabled())
return false; return false;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
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