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

Unified Diff: ash/common/shelf/shelf_view.cc

Issue 2696073002: Merge ShelfItemDelegate::ItemSelected & LauncherItemDelegate::Activate. (Closed)
Patch Set: Cleanup Created 3 years, 10 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: ash/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 8ab622522b10f43fbe094d97054770879f2970a9..781085a0cf00dcea2982afd7c79096bbb3ceedb7 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -435,8 +435,8 @@ void ShelfView::ButtonPressed(views::Button* sender,
views::InkDrop* ink_drop) {
if (sender == overflow_button_) {
ToggleOverflowBubble();
- shelf_button_pressed_metric_tracker_.ButtonPressed(
- event, sender, ShelfItemDelegate::kNoAction);
+ shelf_button_pressed_metric_tracker_.ButtonPressed(event, sender,
+ kNoAction);
return;
}
@@ -483,17 +483,19 @@ void ShelfView::ButtonPressed(views::Button* sender,
break;
}
- ShelfItemDelegate::PerformedAction performed_action =
+ const int64_t display_id = window->GetDisplayNearestWindow().id();
+ ShelfAction performed_action =
model_->GetShelfItemDelegate(model_->items()[last_pressed_index_].id)
- ->ItemSelected(event);
+ ->ItemSelected(event.type(), event.flags(), display_id,
+ LAUNCH_FROM_UNKNOWN);
James Cook 2017/02/15 00:44:40 It's kind of weird that this is "LAUNCH_FROM_UNKNO
msw 2017/02/15 19:59:17 It's mostly used for logging at the moment, I'd ra
shelf_button_pressed_metric_tracker_.ButtonPressed(event, sender,
performed_action);
// For the app list menu no TRIGGERED ink drop effect is needed and it
// handles its own ACTIVATED/DEACTIVATED states.
- if (performed_action == ShelfItemDelegate::kNewWindowCreated ||
- (performed_action != ShelfItemDelegate::kAppListMenuShown &&
+ if (performed_action == kNewWindowCreated ||
+ (performed_action != kAppListMenuShown &&
!ShowListMenuForView(model_->items()[last_pressed_index_], sender, event,
ink_drop))) {
ink_drop->AnimateToState(views::InkDropState::ACTION_TRIGGERED);

Powered by Google App Engine
This is Rietveld 408576698