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

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

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: cleanup 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_window.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window.cc b/chrome/browser/ui/ash/launcher/arc_app_window.cc
index d47bf54ef72a1e9207b9945d97a8d38faac75b99..d9f491ccb137cfcade4cd3dcec2b503de7b4351c 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window.cc
@@ -33,8 +33,6 @@ void ArcAppWindow::SetController(
ArcAppWindowLauncherItemController* controller) {
DCHECK(!controller_ || !controller);
controller_ = controller;
- if (controller_)
- controller_->UpdateLauncherItem();
}
void ArcAppWindow::SetFullscreenMode(FullScreenMode mode) {
@@ -158,20 +156,15 @@ void ArcAppWindow::SetAlwaysOnTop(bool always_on_top) {
}
void ArcAppWindow::ResetIcon() {
- if (icon_.isNull())
- return;
- icon_ = gfx::ImageSkia();
- if (controller_)
- controller_->UpdateLauncherItem();
+ exo::ShellSurface::SetAppIcon(GetNativeWindow(), gfx::ImageSkia());
}
void ArcAppWindow::OnImageDecoded(const SkBitmap& decoded_image) {
- // TODO(khmel): Use aura::Window property http://crbug.com/724292
- icon_ = gfx::ImageSkiaOperations::CreateResizedImage(
- gfx::ImageSkia(gfx::ImageSkiaRep(decoded_image, 1.0f)),
- skia::ImageOperations::RESIZE_BEST,
- gfx::Size(extension_misc::EXTENSION_ICON_SMALL,
- extension_misc::EXTENSION_ICON_SMALL));
- if (controller_)
- controller_->UpdateLauncherItem();
+ exo::ShellSurface::SetAppIcon(
+ GetNativeWindow(),
+ gfx::ImageSkiaOperations::CreateResizedImage(
+ gfx::ImageSkia(gfx::ImageSkiaRep(decoded_image, 1.0f)),
+ skia::ImageOperations::RESIZE_BEST,
+ gfx::Size(extension_misc::EXTENSION_ICON_SMALL,
+ extension_misc::EXTENSION_ICON_SMALL)));
}

Powered by Google App Engine
This is Rietveld 408576698