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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shelf/shelf_model.h" 10 #include "ash/common/shelf/shelf_model.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ->user_wallpaper_delegate() 102 ->user_wallpaper_delegate()
103 ->CanOpenSetWallpaperPage(); 103 ->CanOpenSetWallpaperPage();
104 case MENU_AUTO_HIDE: 104 case MENU_AUTO_HIDE:
105 return CanUserModifyShelfAutoHideBehavior(controller_->GetProfile()); 105 return CanUserModifyShelfAutoHideBehavior(controller_->GetProfile());
106 default: 106 default:
107 DCHECK(command_id < MENU_ITEM_COUNT); 107 DCHECK(command_id < MENU_ITEM_COUNT);
108 return true; 108 return true;
109 } 109 }
110 } 110 }
111 111
112 bool LauncherContextMenu::GetAcceleratorForCommandId(
113 int command_id,
114 ui::Accelerator* accelerator) const {
115 return false;
116 }
117
118 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) { 112 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
119 switch (static_cast<MenuItem>(command_id)) { 113 switch (static_cast<MenuItem>(command_id)) {
120 case MENU_OPEN_NEW: 114 case MENU_OPEN_NEW:
121 controller_->Launch(item_.id, ui::EF_NONE); 115 controller_->Launch(item_.id, ui::EF_NONE);
122 break; 116 break;
123 case MENU_CLOSE: 117 case MENU_CLOSE:
124 if (item_.type == ash::TYPE_DIALOG) { 118 if (item_.type == ash::TYPE_DIALOG) {
125 ash::ShelfItemDelegate* item_delegate = 119 ash::ShelfItemDelegate* item_delegate =
126 ash::WmShell::Get()->shelf_model()->GetShelfItemDelegate(item_.id); 120 ash::WmShell::Get()->shelf_model()->GetShelfItemDelegate(item_.id);
127 DCHECK(item_delegate); 121 DCHECK(item_delegate);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 case MENU_PIN: 199 case MENU_PIN:
206 case MENU_AUTO_HIDE: 200 case MENU_AUTO_HIDE:
207 case MENU_ALIGNMENT_MENU: 201 case MENU_ALIGNMENT_MENU:
208 case MENU_CHANGE_WALLPAPER: 202 case MENU_CHANGE_WALLPAPER:
209 LauncherContextMenu::ExecuteCommand(command_id, event_flags); 203 LauncherContextMenu::ExecuteCommand(command_id, event_flags);
210 return true; 204 return true;
211 default: 205 default:
212 return false; 206 return false;
213 } 207 }
214 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698