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

Side by Side Diff: ash/sysui/context_menu_mus.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, 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
« no previous file with comments | « ash/sysui/context_menu_mus.h ('k') | ash/sysui/shelf_delegate_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/sysui/context_menu_mus.h" 5 #include "ash/sysui/context_menu_mus.h"
6 6
7 #include "ash/common/shelf/shelf_types.h" 7 #include "ash/common/shelf/shelf_types.h"
8 #include "ash/common/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/desktop_background/user_wallpaper_delegate.h" 9 #include "ash/desktop_background/user_wallpaper_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 23 matching lines...) Expand all
34 return false; 34 return false;
35 } 35 }
36 36
37 bool ContextMenuMus::IsCommandIdEnabled(int command_id) const { 37 bool ContextMenuMus::IsCommandIdEnabled(int command_id) const {
38 Shell* shell = Shell::GetInstance(); 38 Shell* shell = Shell::GetInstance();
39 if (command_id == MENU_CHANGE_WALLPAPER) 39 if (command_id == MENU_CHANGE_WALLPAPER)
40 return shell->user_wallpaper_delegate()->CanOpenSetWallpaperPage(); 40 return shell->user_wallpaper_delegate()->CanOpenSetWallpaperPage();
41 return true; 41 return true;
42 } 42 }
43 43
44 bool ContextMenuMus::GetAcceleratorForCommandId(
45 int command_id,
46 ui::Accelerator* accelerator) const {
47 return false;
48 }
49
50 void ContextMenuMus::ExecuteCommand(int command_id, int event_flags) { 44 void ContextMenuMus::ExecuteCommand(int command_id, int event_flags) {
51 if (command_id == MENU_AUTO_HIDE) { 45 if (command_id == MENU_AUTO_HIDE) {
52 wm_shelf_->SetAutoHideBehavior(wm_shelf_->GetAutoHideBehavior() == 46 wm_shelf_->SetAutoHideBehavior(wm_shelf_->GetAutoHideBehavior() ==
53 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS 47 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS
54 ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER 48 ? SHELF_AUTO_HIDE_BEHAVIOR_NEVER
55 : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 49 : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
56 } else if (command_id == MENU_CHANGE_WALLPAPER) { 50 } else if (command_id == MENU_CHANGE_WALLPAPER) {
57 Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage(); 51 Shell::GetInstance()->user_wallpaper_delegate()->OpenSetWallpaperPage();
58 } 52 }
59 } 53 }
60 54
61 } // namespace ash 55 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sysui/context_menu_mus.h ('k') | ash/sysui/shelf_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698