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

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

Issue 2696073002: Merge ShelfItemDelegate::ItemSelected & LauncherItemDelegate::Activate. (Closed)
Patch Set: nit 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
« no previous file with comments | « ash/common/shelf/shelf_item_delegate.cc ('k') | ash/common/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4e4c1a8bee5b09f9bed8d77f23022a7102964373 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,
+ SHELF_ACTION_NONE);
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);
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 == SHELF_ACTION_NEW_WINDOW_CREATED ||
+ (performed_action != SHELF_ACTION_APP_LIST_SHOWN &&
!ShowListMenuForView(model_->items()[last_pressed_index_], sender, event,
ink_drop))) {
ink_drop->AnimateToState(views::InkDropState::ACTION_TRIGGERED);
« no previous file with comments | « ash/common/shelf/shelf_item_delegate.cc ('k') | ash/common/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698