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

Unified Diff: components/exo/shell_surface.cc

Issue 2900783003: Handle app custom icon via aura::Window property. (Closed)
Patch Set: nits, discard owner from _item_controller, make SetAppIcon non-static 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: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 998769b20df6aeb73b117963a2e0d1d153fef79a..70c62cd2948bbae0bc1c96daca571ae313b96ba8 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -531,6 +531,11 @@ void ShellSurface::SetApplicationId(const std::string& application_id) {
SetApplicationId(widget_->GetNativeWindow(), application_id);
}
+void ShellSurface::SetAppIcon(const gfx::ImageSkia& icon) {
+ icon_ = icon;
+ widget_->UpdateWindowIcon();
reveman 2017/06/01 22:05:36 nit: please leave this up to the caller so icon ca
khmel 2017/06/01 22:19:27 I did it the same way as SetTitle if (widget_)
reveman 2017/06/01 22:26:00 Sounds good. Thanks!
+}
+
void ShellSurface::Move() {
TRACE_EVENT0("exo", "ShellSurface::Move");
@@ -819,6 +824,10 @@ base::string16 ShellSurface::GetWindowTitle() const {
return title_;
}
+gfx::ImageSkia ShellSurface::GetWindowIcon() {
+ return icon_;
+}
+
void ShellSurface::SaveWindowPlacement(const gfx::Rect& bounds,
ui::WindowShowState show_state) {
if (bounds_mode_ != BoundsMode::CLIENT)

Powered by Google App Engine
This is Rietveld 408576698