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

Unified Diff: ash/shelf/shelf_application_menu_model.cc

Issue 2825533003: mash: Prerequisites for removing ShelfDelegate. (Closed)
Patch Set: Expand CheckWindowAndItemPlacement comment. Created 3 years, 8 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/metrics/user_metrics_recorder_unittest.cc ('k') | ash/shelf/shelf_application_menu_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_application_menu_model.cc
diff --git a/ash/shelf/shelf_application_menu_model.cc b/ash/shelf/shelf_application_menu_model.cc
index 503ce9b83cc256932e55cdb95c05b8a79f457cdb..d991f340ce9f6aa059aa9cdb835a055ff2937f49 100644
--- a/ash/shelf/shelf_application_menu_model.cc
+++ b/ash/shelf/shelf_application_menu_model.cc
@@ -57,10 +57,10 @@ bool ShelfApplicationMenuModel::IsCommandIdEnabled(int command_id) const {
void ShelfApplicationMenuModel::ExecuteCommand(int command_id,
int event_flags) {
- DCHECK(delegate_);
DCHECK(IsCommandIdEnabled(command_id));
// Have the delegate execute its own custom command id for the given item.
- delegate_->ExecuteCommand(items_[command_id]->command_id, event_flags);
+ if (delegate_)
+ delegate_->ExecuteCommand(items_[command_id]->command_id, event_flags);
RecordMenuItemSelectedMetrics(command_id, items_.size());
}
« no previous file with comments | « ash/metrics/user_metrics_recorder_unittest.cc ('k') | ash/shelf/shelf_application_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698