Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| index 6670fe49821920dc89a7458614cb5528f5ebb9b5..06a340a7bcfd419a5ab99db63c1f63af9fb13e44 100644 |
| --- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| @@ -69,31 +69,25 @@ void AppWindowLauncherItemController::SetActiveWindow(aura::Window* window) { |
| last_active_window_ = app_window; |
| } |
| -ash::ShelfItemDelegate::PerformedAction |
| -AppWindowLauncherItemController::Activate(ash::LaunchSource source) { |
| - DCHECK(!windows_.empty()); |
| - ui::BaseWindow* window_to_activate = |
| - last_active_window_ ? last_active_window_ : windows_.back(); |
| - window_to_activate->Activate(); |
| - return kExistingWindowActivated; |
| -} |
|
James Cook
2017/02/15 00:44:40
I'm a little lost. Where did the functionality pro
msw
2017/02/15 19:59:18
It's nearly equivalent to ItemSelected; and I can'
|
| - |
| AppWindowLauncherItemController* |
| AppWindowLauncherItemController::AsAppWindowLauncherItemController() { |
| return this; |
| } |
| -ash::ShelfItemDelegate::PerformedAction |
| -AppWindowLauncherItemController::ItemSelected(const ui::Event& event) { |
| +ash::ShelfAction AppWindowLauncherItemController::ItemSelected( |
| + ui::EventType event_type, |
| + int event_flags, |
| + int64_t display_id, |
| + ash::ShelfLaunchSource source) { |
| if (windows_.empty()) |
| - return kNoAction; |
| + return ash::kNoAction; |
| ui::BaseWindow* window_to_show = |
| last_active_window_ ? last_active_window_ : windows_.front(); |
| // If the event was triggered by a keystroke, we try to advance to the next |
| // item if the window we are trying to activate is already active. |
| if (windows_.size() >= 1 && window_to_show->IsActive() && |
| - event.type() == ui::ET_KEY_RELEASED) { |
| + event_type == ui::ET_KEY_RELEASED) { |
| return ActivateOrAdvanceToNextAppWindow(window_to_show); |
| } |
| @@ -137,15 +131,14 @@ void AppWindowLauncherItemController::OnWindowPropertyChanged( |
| } |
| } |
| -ash::ShelfItemDelegate::PerformedAction |
| -AppWindowLauncherItemController::ShowAndActivateOrMinimize( |
| +ash::ShelfAction AppWindowLauncherItemController::ShowAndActivateOrMinimize( |
| ui::BaseWindow* app_window) { |
| // Either show or minimize windows when shown from the launcher. |
| return launcher_controller()->ActivateWindowOrMinimizeIfActive( |
| app_window, GetAppMenuItems(0).size() == 1); |
| } |
| -ash::ShelfItemDelegate::PerformedAction |
| +ash::ShelfAction |
| AppWindowLauncherItemController::ActivateOrAdvanceToNextAppWindow( |
| ui::BaseWindow* window_to_show) { |
| WindowList::iterator i( |
| @@ -164,5 +157,5 @@ AppWindowLauncherItemController::ActivateOrAdvanceToNextAppWindow( |
| } else { |
| return ShowAndActivateOrMinimize(window_to_show); |
| } |
| - return kNoAction; |
| + return ash::kNoAction; |
| } |