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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.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
Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
index df3fc2d2930e4f0f31c3ea1de8cf31e98cca0a2c..a5dea34960677a6dafba679933ac1a58587ab0bd 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
@@ -35,18 +35,22 @@ bool ArcAppWindowLauncherItemController::HasAnyTasks() const {
return !task_ids_.empty();
}
-ash::ShelfItemDelegate::PerformedAction
-ArcAppWindowLauncherItemController::ItemSelected(const ui::Event& event) {
+ash::ShelfAction ArcAppWindowLauncherItemController::ItemSelected(
+ ui::EventType event_type,
+ int event_flags,
+ int64_t display_id,
+ ash::ShelfLaunchSource source) {
if (window_count()) {
- return AppWindowLauncherItemController::ItemSelected(event);
- } else {
- if (task_ids_.empty()) {
- NOTREACHED();
- return kNoAction;
- }
- arc::SetTaskActive(*task_ids_.begin());
- return kNewWindowCreated;
+ return AppWindowLauncherItemController::ItemSelected(
+ event_type, event_flags, display_id, source);
}
+
+ if (task_ids_.empty()) {
+ NOTREACHED();
+ return ash::SHELF_ACTION_NONE;
+ }
+ arc::SetTaskActive(*task_ids_.begin());
+ return ash::SHELF_ACTION_NEW_WINDOW_CREATED;
}
ash::ShelfAppMenuItemList ArcAppWindowLauncherItemController::GetAppMenuItems(

Powered by Google App Engine
This is Rietveld 408576698