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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: nits Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id); 841 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id);
842 if (app_icon_loader) { 842 if (app_icon_loader) {
843 app_icon_loader->ClearImage(app_id); 843 app_icon_loader->ClearImage(app_id);
844 app_icon_loader->FetchImage(app_id); 844 app_icon_loader->FetchImage(app_id);
845 } 845 }
846 } 846 }
847 847
848 UpdateAppLaunchersFromPref(); 848 UpdateAppLaunchersFromPref();
849 } 849 }
850 850
851 void ChromeLauncherControllerImpl::OnAppUpdated(
852 content::BrowserContext* browser_context,
853 const std::string& app_id) {
854 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id);
855 if (app_icon_loader)
856 app_icon_loader->UpdateImage(app_id);
857 }
858
859 void ChromeLauncherControllerImpl::OnAppUninstalledPrepared( 851 void ChromeLauncherControllerImpl::OnAppUninstalledPrepared(
860 content::BrowserContext* browser_context, 852 content::BrowserContext* browser_context,
861 const std::string& app_id) { 853 const std::string& app_id) {
862 // Since we might have windowed apps of this type which might have 854 // Since we might have windowed apps of this type which might have
863 // outstanding locks which needs to be removed. 855 // outstanding locks which needs to be removed.
864 const Profile* profile = Profile::FromBrowserContext(browser_context); 856 const Profile* profile = Profile::FromBrowserContext(browser_context);
865 ash::ShelfID shelf_id = GetShelfIDForAppID(app_id); 857 ash::ShelfID shelf_id = GetShelfIDForAppID(app_id);
866 if (shelf_id != ash::kInvalidShelfID) 858 if (shelf_id != ash::kInvalidShelfID)
867 CloseWindowedAppsFromRemovedExtension(app_id, profile); 859 CloseWindowedAppsFromRemovedExtension(app_id, profile);
868 860
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 item.app_launch_id.app_id() != app_id) { 1366 item.app_launch_id.app_id() != app_id) {
1375 continue; 1367 continue;
1376 } 1368 }
1377 item.image = image; 1369 item.image = image;
1378 if (arc_deferred_launcher_) 1370 if (arc_deferred_launcher_)
1379 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image); 1371 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image);
1380 model_->Set(index, item); 1372 model_->Set(index, item);
1381 // It's possible we're waiting on more than one item, so don't break. 1373 // It's possible we're waiting on more than one item, so don't break.
1382 } 1374 }
1383 } 1375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698