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

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

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: fix mac compile 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 97c20fcf43d4871992e7e8fdde5639e138b011ed..79f0f7d6094f2aadd80368a854666cf28b07c96b 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
@@ -116,7 +116,7 @@ void ArcAppDeferredLauncherController::Close(const std::string& app_id) {
app_controller_map_.erase(it);
if (need_close_item)
owner_->CloseLauncherItem(shelf_id);
- UpdateApp(safe_app_id);
+ UpdateShelfItemIcon(safe_app_id);
}
void ArcAppDeferredLauncherController::OnAppReadyChanged(
@@ -163,10 +163,9 @@ 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::UpdateShelfItemIcon(
+ const std::string& app_id) {
+ owner_->UpdateLauncherItemImage(app_id);
}
void ArcAppDeferredLauncherController::UpdateApps() {
@@ -175,7 +174,7 @@ void ArcAppDeferredLauncherController::UpdateApps() {
RegisterNextUpdate();
for (const auto pair : app_controller_map_)
- UpdateApp(pair.first);
+ UpdateShelfItemIcon(pair.first);
}
void ArcAppDeferredLauncherController::RegisterNextUpdate() {
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h ('k') | chrome/browser/ui/ash/launcher/arc_app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698