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

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

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: fix mac compile 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.h
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window.h b/chrome/browser/ui/ash/launcher/arc_app_window.h
index ffef2ba06042266456663ed3bb8d31909d5d26b7..488685555f0372969cef55aed1d95de7cfe5061f 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window.h
+++ b/chrome/browser/ui/ash/launcher/arc_app_window.h
@@ -13,10 +13,12 @@
#include "chrome/browser/image_decoder.h"
#include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h"
#include "ui/base/base_window.h"
-#include "ui/gfx/image/image_skia.h"
class ArcAppWindowLauncherController;
class ArcAppWindowLauncherItemController;
+namespace gfx {
+class ImageSkia;
+}
namespace views {
class Widget;
@@ -63,8 +65,6 @@ class ArcAppWindow : public ui::BaseWindow, public ImageDecoder::ImageRequest {
ArcAppWindowLauncherItemController* controller() { return controller_; }
- const gfx::ImageSkia& icon() const { return icon_; }
-
// ui::BaseWindow:
bool IsActive() const override;
bool IsMaximized() const override;
@@ -89,8 +89,8 @@ class ArcAppWindow : public ui::BaseWindow, public ImageDecoder::ImageRequest {
void SetAlwaysOnTop(bool always_on_top) override;
private:
- // Resets the icon and updates |controller_|'s active icon as needed.
- void ResetIcon();
+ // Sets the icon for the window.
+ void SetIcon(const gfx::ImageSkia& icon);
// ImageDecoder::ImageRequest:
void OnImageDecoded(const SkBitmap& decoded_image) override;
@@ -103,8 +103,6 @@ class ArcAppWindow : public ui::BaseWindow, public ImageDecoder::ImageRequest {
ash::ShelfID shelf_id_;
// Keeps current full-screen mode.
FullScreenMode fullscreen_mode_ = FullScreenMode::NOT_DEFINED;
- // Contains custom icon if it was set.
- gfx::ImageSkia icon_;
// Unowned pointers
views::Widget* const widget_;
ArcAppWindowLauncherController* const owner_;

Powered by Google App Engine
This is Rietveld 408576698