Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5591)

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: nit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
index 453d3cff02801d6084a26d1931bd600cf3b21b9b..17504585d38340b5852cbc888adb3d0c59927363 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
@@ -117,7 +117,7 @@ void ArcAppDeferredLauncherController::Close(const std::string& app_id) {
app_controller_map_.erase(it);
if (need_close_item)
owner_->CloseLauncherItem(shelf_id);
- owner_->OnAppUpdated(owner_->profile(), shelf_app_id);
+ UpdateApp(shelf_app_id);
}
void ArcAppDeferredLauncherController::OnAppReadyChanged(
@@ -168,13 +168,19 @@ base::TimeDelta ArcAppDeferredLauncherController::GetActiveTime(
return it->second->GetActiveTime();
}
+void ArcAppDeferredLauncherController::UpdateApp(const std::string& app_id) {
+ AppIconLoader* icon_loader = owner_->GetAppIconLoaderForApp(app_id);
+ if (icon_loader)
+ icon_loader->UpdateImage(app_id);
+}
+
void ArcAppDeferredLauncherController::UpdateApps() {
if (app_controller_map_.empty())
return;
RegisterNextUpdate();
for (const auto pair : app_controller_map_)
- owner_->OnAppUpdated(owner_->profile(), pair.first);
+ UpdateApp(pair.first);
}
void ArcAppDeferredLauncherController::RegisterNextUpdate() {

Powered by Google App Engine
This is Rietveld 408576698