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

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

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: Devlin's comments 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 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id); 787 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id);
788 if (app_icon_loader) { 788 if (app_icon_loader) {
789 app_icon_loader->ClearImage(app_id); 789 app_icon_loader->ClearImage(app_id);
790 app_icon_loader->FetchImage(app_id); 790 app_icon_loader->FetchImage(app_id);
791 } 791 }
792 } 792 }
793 793
794 UpdateAppLaunchersFromPref(); 794 UpdateAppLaunchersFromPref();
795 } 795 }
796 796
797 void ChromeLauncherControllerImpl::OnAppUpdated(
798 content::BrowserContext* browser_context,
799 const std::string& app_id) {
800 AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app_id);
801 if (app_icon_loader)
802 app_icon_loader->UpdateImage(app_id);
803 }
804
805 void ChromeLauncherControllerImpl::OnAppUninstalledPrepared( 797 void ChromeLauncherControllerImpl::OnAppUninstalledPrepared(
806 content::BrowserContext* browser_context, 798 content::BrowserContext* browser_context,
807 const std::string& app_id) { 799 const std::string& app_id) {
808 // Since we might have windowed apps of this type which might have 800 // Since we might have windowed apps of this type which might have
809 // outstanding locks which needs to be removed. 801 // outstanding locks which needs to be removed.
810 const Profile* profile = Profile::FromBrowserContext(browser_context); 802 const Profile* profile = Profile::FromBrowserContext(browser_context);
811 ash::ShelfID shelf_id = GetShelfIDForAppID(app_id); 803 ash::ShelfID shelf_id = GetShelfIDForAppID(app_id);
812 if (shelf_id != ash::kInvalidShelfID) 804 if (shelf_id != ash::kInvalidShelfID)
813 CloseWindowedAppsFromRemovedExtension(app_id, profile); 805 CloseWindowedAppsFromRemovedExtension(app_id, profile);
814 806
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 item.app_launch_id.app_id() != app_id) { 1339 item.app_launch_id.app_id() != app_id) {
1348 continue; 1340 continue;
1349 } 1341 }
1350 item.image = image; 1342 item.image = image;
1351 if (arc_deferred_launcher_) 1343 if (arc_deferred_launcher_)
1352 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image); 1344 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image);
1353 model_->Set(index, item); 1345 model_->Set(index, item);
1354 // It's possible we're waiting on more than one item, so don't break. 1346 // It's possible we're waiting on more than one item, so don't break.
1355 } 1347 }
1356 } 1348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698