Commit 4a3c89a1 authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Commit Bot

Revert "Fix in app shelf style for Assistant launcher UI"

This reverts commit dabaa28e.

Reason for revert: UX wants a different behavior
BUG: http://crbug.com/1039787

Original change's description:
> Fix in app shelf style for Assistant launcher UI
> 
> With the Assistant launcher UI and new shelf design feature turned on,
> if the Assistant is triggered in tablet mode the shelf style will be
> changed back to "home shelf".
> 
> Added an additional check in ShelfConfig for the Assistant state to
> handle this case.
> 
> Bug: 1026727
> Test: Manual Test
> Change-Id: Ie9ca0980583117e5b17d21fa9257f91f3ebe5647
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975114
> Commit-Queue: Yue Li <updowndota@chromium.org>
> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
> Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#726929}

TBR=xiyuan@chromium.org,xiaohuic@chromium.org,updowndota@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1026727
Change-Id: Iaae20490e2db0154985d692f96f09f922a7b05ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1990261Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729158}
parent 33e96468
......@@ -548,9 +548,6 @@ void AppListControllerImpl::OnAppListStateChanged(AppListState new_state,
if (!app_list_features::IsAssistantLauncherUIEnabled())
return;
ash::ShelfConfig::Get()->SetAssistantVisible(
new_state == AppListState::kStateEmbeddedAssistant);
UpdateLauncherContainer();
// Band-aid for https://b/144056527 to update visibility after AppListState
......
......@@ -53,8 +53,6 @@ class ASH_EXPORT ShelfConfig : public TabletModeObserver,
// AppListControllerObserver:
void OnAppListVisibilityWillChange(bool shown, int64_t display_id) override;
void SetAssistantVisible(bool visible);
// Size of the shelf when visible (height when the shelf is horizontal and
// width when the shelf is vertical).
int shelf_size() const;
......@@ -191,9 +189,6 @@ class ASH_EXPORT ShelfConfig : public TabletModeObserver,
// Whether the app list (or home launcher in tablet mode) is visible.
bool is_app_list_visible_;
// Whether the Assistant launcher UI is visible.
bool is_assistant_visible_ = false;
// Size of the icons within shelf buttons.
const int shelf_button_icon_size_;
const int shelf_button_icon_size_dense_;
......
......@@ -122,14 +122,6 @@ void ShelfConfig::OnAppListVisibilityWillChange(bool shown,
OnShelfConfigUpdated();
}
void ShelfConfig::SetAssistantVisible(bool visible) {
if (is_assistant_visible_ == visible)
return;
is_assistant_visible_ = visible;
OnShelfConfigUpdated();
}
int ShelfConfig::shelf_size() const {
return GetShelfSize(false /*ignore_in_app_state*/);
}
......@@ -212,9 +204,8 @@ bool ShelfConfig::is_in_app() const {
const auto* session = shell->session_controller();
if (!session)
return false;
return session->GetSessionState() == session_manager::SessionState::ACTIVE &&
(!is_app_list_visible_ || is_assistant_visible_);
!is_app_list_visible_;
}
void ShelfConfig::UpdateIsDense() {
......
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