| Index: chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| index 669ce2e854d4b97f28dcc820afab9b97372082fe..7b1ed438e7bc3c75cb23fea0270c7626e4acd444 100644
|
| --- a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| @@ -92,6 +92,12 @@ void ExtensionAppWindowLauncherController::OnAppWindowIconChanged(
|
| AppControllerMap::iterator iter = app_controller_map_.find(app_shelf_id);
|
| if (iter == app_controller_map_.end())
|
| return;
|
| +
|
| + // Check if the window actually overrides its default icon. Otherwise use app
|
| + // icon loader provided by owner.
|
| + if (!app_window->HasCustomIcon() || app_window->app_icon().IsEmpty())
|
| + return;
|
| +
|
| ExtensionAppWindowLauncherItemController* controller = iter->second;
|
| controller->set_image_set_by_controller(true);
|
| owner()->SetLauncherItemImage(controller->shelf_id(),
|
| @@ -182,9 +188,9 @@ void ExtensionAppWindowLauncherController::RegisterApp(AppWindow* app_window) {
|
| if (shelf_id == 0) {
|
| shelf_id = owner()->CreateAppLauncherItem(std::move(controller), status);
|
| // Restore any existing app icon and flag as set.
|
| - const gfx::Image& app_icon = app_window->app_icon();
|
| - if (!app_icon.IsEmpty()) {
|
| - owner()->SetLauncherItemImage(shelf_id, app_icon.AsImageSkia());
|
| + if (app_window->HasCustomIcon() && !app_window->app_icon().IsEmpty()) {
|
| + owner()->SetLauncherItemImage(shelf_id,
|
| + app_window->app_icon().AsImageSkia());
|
| item_controller->set_image_set_by_controller(true);
|
| }
|
| } else {
|
|
|