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

Unified Diff: ui/aura_shell/launcher/launcher_view.cc

Issue 8289022: Wires keeping the launcher up to date with the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 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
« no previous file with comments | « ui/aura_shell/launcher/launcher_model.cc ('k') | ui/gfx/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/launcher/launcher_view.cc
diff --git a/ui/aura_shell/launcher/launcher_view.cc b/ui/aura_shell/launcher/launcher_view.cc
index ed2f362805d18e48b027b0afa743c89418a7f18f..561b26d79473493b29f56d19a55ce95ef1976720 100644
--- a/ui/aura_shell/launcher/launcher_view.cc
+++ b/ui/aura_shell/launcher/launcher_view.cc
@@ -123,7 +123,18 @@ void LauncherView::LauncherItemRemoved(int index) {
}
void LauncherView::LauncherItemImagesChanged(int index) {
- // TODO: implement me.
+ // TODO: implement better coordinate conversion.
+ const LauncherItem& item(model_->items()[index]);
+ if (item.type == TYPE_TABBED) {
+ TabbedLauncherButton* button =
+ static_cast<TabbedLauncherButton*>(child_at(index + 1));
+ gfx::Size pref = button->GetPreferredSize();
+ button->SetImages(item.tab_images);
+ if (pref != button->GetPreferredSize())
+ Resize();
+ else
+ button->SchedulePaint();
+ }
}
void LauncherView::ButtonPressed(views::Button* sender,
« no previous file with comments | « ui/aura_shell/launcher/launcher_model.cc ('k') | ui/gfx/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698