Commit 40382efe authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Close any spinner before showing a browser app

Some web apps such as the crostini terminal may have a spinner before
the app is launched. This closes any such spinner and removes the icon
prior to recreating the app icon without a spinner.

Bug: 1132089
Change-Id: Ie60c50c6b5c6928db82e43a6682c55fea897efc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538861
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827669}
parent d383c8e1
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h" #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
#include "chrome/browser/ui/ash/launcher/shelf_spinner_controller.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h" #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_finder.h"
...@@ -227,8 +228,12 @@ void BrowserStatusMonitor::AddV1AppToShelf(Browser* browser) { ...@@ -227,8 +228,12 @@ void BrowserStatusMonitor::AddV1AppToShelf(Browser* browser) {
std::string app_id = std::string app_id =
web_app::GetAppIdFromApplicationName(browser->app_name()); web_app::GetAppIdFromApplicationName(browser->app_name());
DCHECK(!app_id.empty()); DCHECK(!app_id.empty());
if (!IsV1AppInShelfWithAppId(app_id)) if (!IsV1AppInShelfWithAppId(app_id)) {
if (auto* chrome_controller = ChromeLauncherController::instance()) {
chrome_controller->GetShelfSpinnerController()->CloseSpinner(app_id);
}
launcher_controller_->SetV1AppStatus(app_id, ash::STATUS_RUNNING); launcher_controller_->SetV1AppStatus(app_id, ash::STATUS_RUNNING);
}
browser_to_app_id_map_[browser] = app_id; browser_to_app_id_map_[browser] = app_id;
} }
......
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