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

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

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ->CanOpenSetWallpaperPage(); 102 ->CanOpenSetWallpaperPage();
103 case MENU_AUTO_HIDE: 103 case MENU_AUTO_HIDE:
104 return CanUserModifyShelfAutoHideBehavior(controller_->GetProfile()); 104 return CanUserModifyShelfAutoHideBehavior(controller_->GetProfile());
105 default: 105 default:
106 DCHECK(command_id < MENU_ITEM_COUNT); 106 DCHECK(command_id < MENU_ITEM_COUNT);
107 return true; 107 return true;
108 } 108 }
109 } 109 }
110 110
111 bool LauncherContextMenu::GetAcceleratorForCommandId( 111 bool LauncherContextMenu::GetAcceleratorForCommandId(
112 int command_id, 112 int command_id,
113 ui::Accelerator* accelerator) { 113 ui::Accelerator* accelerator) const {
114 return false; 114 return false;
115 } 115 }
116 116
117 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) { 117 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
118 switch (static_cast<MenuItem>(command_id)) { 118 switch (static_cast<MenuItem>(command_id)) {
119 case MENU_OPEN_NEW: 119 case MENU_OPEN_NEW:
120 controller_->Launch(item_.id, ui::EF_NONE); 120 controller_->Launch(item_.id, ui::EF_NONE);
121 break; 121 break;
122 case MENU_CLOSE: 122 case MENU_CLOSE:
123 if (item_.type == ash::TYPE_DIALOG) { 123 if (item_.type == ash::TYPE_DIALOG) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 case MENU_PIN: 206 case MENU_PIN:
207 case MENU_AUTO_HIDE: 207 case MENU_AUTO_HIDE:
208 case MENU_ALIGNMENT_MENU: 208 case MENU_ALIGNMENT_MENU:
209 case MENU_CHANGE_WALLPAPER: 209 case MENU_CHANGE_WALLPAPER:
210 LauncherContextMenu::ExecuteCommand(command_id, event_flags); 210 LauncherContextMenu::ExecuteCommand(command_id, event_flags);
211 return true; 211 return true;
212 default: 212 default:
213 return false; 213 return false;
214 } 214 }
215 } 215 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698