[go: nahoru, domu]

[Kiosk] Lazy load icons for Web Apps kiosk

Currently, all icons for Web App kiosks are being loaded automatically
during browser startup, meaning that decoding hapens unconditionally.
Now, the load will start only after kiosk app menu is being clicked at.

Bug: 1066496
Change-Id: Id6cd7e247c35636792c2e39ef6650582f21a9ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128140
Commit-Queue: Anatoliy Potapchuk <apotapchuk@chromium.org>
Reviewed-by: Roman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781259}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index d69c051..552c522 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -412,11 +412,12 @@
 
 void LoginScreenController::SetKioskApps(
     const std::vector<KioskAppMenuEntry>& kiosk_apps,
-    const base::RepeatingCallback<void(const KioskAppMenuEntry&)>& launch_app) {
+    const base::RepeatingCallback<void(const KioskAppMenuEntry&)>& launch_app,
+    const base::RepeatingClosure& on_show_menu) {
   Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
       ->shelf_widget()
       ->login_shelf_view()
-      ->SetKioskApps(kiosk_apps, launch_app);
+      ->SetKioskApps(kiosk_apps, launch_app, on_show_menu);
 }
 
 void LoginScreenController::ShowResetScreen() {