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

Unified Diff: ash/launcher/launcher.cc

Issue 23606016: Refactor LauncherItemController and LauncherItemDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for unittest.. Created 7 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 | « ash/ash.gyp ('k') | ash/launcher/launcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher.cc
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index 68a8da7778fd0c057ecc72c5f3623f8237d125ae..2d5397af185fea9cc7977c7b08fe26aebc1aae20 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -108,8 +108,11 @@ void Launcher::ActivateLauncherItem(int index) {
false);
const ash::LauncherItem& item = launcher_view_->model()->items()[index];
- Shell::GetInstance()->launcher_item_delegate_manager()->
- GetLauncherItemDelegate(item.type)->ItemSelected(item, event);
+ ash::LauncherItemDelegate* item_delegate =
+ Shell::GetInstance()->launcher_item_delegate_manager()->
+ GetLauncherItemDelegate(item.id);
+ if (item_delegate)
+ item_delegate->ItemSelected(event);
}
void Launcher::CycleWindowLinear(CycleDirection direction) {
« no previous file with comments | « ash/ash.gyp ('k') | ash/launcher/launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698