Commit 0935a0c7 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Guard multi-signin support in BrowserNonClientBrowserFrameViewAsh

Per jamescook's remark in [1], feature will be deprecated in Lacros.

[1] https://docs.google.com/document/d/1xHwcHrAiEaWuA4usGEqKZ9zm1H8SGk3WkS-Jf2Q_los/edit?disco=AAAAKwfILZM

After this, BrowserNonClientFrameViewAsh can be renamed
(ChromeOS suffix) and adopted in Lacros builds as well.

BUG=1113900
R=jamescook@chromium.org

Change-Id: Ic4b74fe7af16da17fc4ea12b5b3464d8759549f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532611Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#826962}
parent 9609d21f
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#include "chrome/browser/platform_util.h" #include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profiles_state.h" #include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_helper.h"
#include "chrome/browser/ui/ash/session_util.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/layout_constants.h" #include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/ui_features.h"
...@@ -66,6 +64,8 @@ ...@@ -66,6 +64,8 @@
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/public/cpp/app_types.h" #include "ash/public/cpp/app_types.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_helper.h"
#include "chrome/browser/ui/ash/session_util.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
namespace { namespace {
...@@ -660,6 +660,7 @@ void BrowserNonClientFrameViewAsh::UpdateTopViewInset() { ...@@ -660,6 +660,7 @@ void BrowserNonClientFrameViewAsh::UpdateTopViewInset() {
} }
bool BrowserNonClientFrameViewAsh::ShouldShowProfileIndicatorIcon() const { bool BrowserNonClientFrameViewAsh::ShouldShowProfileIndicatorIcon() const {
#if BUILDFLAG(IS_CHROMEOS_ASH)
// We only show the profile indicator for the teleported browser windows // We only show the profile indicator for the teleported browser windows
// between multi-user sessions. Note that you can't teleport an incognito // between multi-user sessions. Note that you can't teleport an incognito
// window. // window.
...@@ -680,9 +681,14 @@ bool BrowserNonClientFrameViewAsh::ShouldShowProfileIndicatorIcon() const { ...@@ -680,9 +681,14 @@ bool BrowserNonClientFrameViewAsh::ShouldShowProfileIndicatorIcon() const {
return MultiUserWindowManagerHelper::ShouldShowAvatar( return MultiUserWindowManagerHelper::ShouldShowAvatar(
browser_view()->GetNativeWindow()); browser_view()->GetNativeWindow());
#else
NOTIMPLEMENTED() << "Multi-signin support is deprecated in Lacros.";
return false;
#endif
} }
void BrowserNonClientFrameViewAsh::UpdateProfileIcons() { void BrowserNonClientFrameViewAsh::UpdateProfileIcons() {
#if BUILDFLAG(IS_CHROMEOS_ASH)
View* root_view = frame()->GetRootView(); View* root_view = frame()->GetRootView();
if (ShouldShowProfileIndicatorIcon()) { if (ShouldShowProfileIndicatorIcon()) {
bool needs_layout = !profile_indicator_icon_; bool needs_layout = !profile_indicator_icon_;
...@@ -707,6 +713,9 @@ void BrowserNonClientFrameViewAsh::UpdateProfileIcons() { ...@@ -707,6 +713,9 @@ void BrowserNonClientFrameViewAsh::UpdateProfileIcons() {
if (root_view) if (root_view)
root_view->Layout(); root_view->Layout();
} }
#else
NOTIMPLEMENTED() << "Multi-signin support is deprecated in Lacros.";
#endif
} }
void BrowserNonClientFrameViewAsh::LayoutProfileIndicator() { void BrowserNonClientFrameViewAsh::LayoutProfileIndicator() {
......
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