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

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

Issue 1838263002: Arc app integration in shelf launcher context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h"
6
7 #include <string>
8
9 #include "ash/desktop_background/user_wallpaper_delegate.h"
10 #include "ash/shelf/shelf.h"
11 #include "ash/shelf/shelf_item_types.h"
12 #include "ash/shell.h"
13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
14
15 DesktopShellLauncherContextMenu::DesktopShellLauncherContextMenu(
16 ChromeLauncherController* controller,
17 const ash::ShelfItem* item,
18 ash::Shelf* shelf)
19 : LauncherContextMenu(controller, item, shelf) {
20 Init();
21 }
22
23 DesktopShellLauncherContextMenu::~DesktopShellLauncherContextMenu() {}
24
25 void DesktopShellLauncherContextMenu::Init() {
26 AddAutohideAlignmentWallpaperMenu();
27 }
28
29 bool DesktopShellLauncherContextMenu::IsCommandIdEnabled(int command_id) const {
30 switch (command_id) {
31 case MENU_CHANGE_WALLPAPER:
32 return ash::Shell::GetInstance()
33 ->user_wallpaper_delegate()
34 ->CanOpenSetWallpaperPage();
35 case MENU_AUTO_HIDE:
36 return CanUserModifyShelfAutoHideBehavior();
37 case MENU_ALIGNMENT_MENU:
38 return true;
39 default:
40 NOTREACHED();
41 return false;
42 }
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698