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

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

Issue 298303002: Add option to install an ephemeral app to ChromeOS shelf context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed asargent's review comments Created 6 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
7 7
8 #include "ash/shelf/shelf_alignment_menu.h" 8 #include "ash/shelf/shelf_alignment_menu.h"
9 #include "ash/shelf/shelf_item_types.h" 9 #include "ash/shelf/shelf_item_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void Init(); 50 void Init();
51 51
52 // ID of the item we're showing the context menu for. 52 // ID of the item we're showing the context menu for.
53 ash::ShelfID id() const { return item_.id; } 53 ash::ShelfID id() const { return item_.id; }
54 54
55 // ui::SimpleMenuModel::Delegate overrides: 55 // ui::SimpleMenuModel::Delegate overrides:
56 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; 56 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE;
57 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; 57 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE;
58 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 58 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
59 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 59 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
60 virtual bool IsCommandIdVisible(int command_id) const OVERRIDE;
60 virtual bool GetAcceleratorForCommandId( 61 virtual bool GetAcceleratorForCommandId(
61 int command_id, 62 int command_id,
62 ui::Accelerator* accelerator) OVERRIDE; 63 ui::Accelerator* accelerator) OVERRIDE;
63 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; 64 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
64 65
65 private: 66 private:
66 FRIEND_TEST_ALL_PREFIXES( 67 FRIEND_TEST_ALL_PREFIXES(
67 LauncherContextMenuTest, 68 LauncherContextMenuTest,
68 NewIncognitoWindowMenuIsDisabledWhenIncognitoModeOff); 69 NewIncognitoWindowMenuIsDisabledWhenIncognitoModeOff);
69 FRIEND_TEST_ALL_PREFIXES( 70 FRIEND_TEST_ALL_PREFIXES(
70 LauncherContextMenuTest, 71 LauncherContextMenuTest,
71 NewWindowMenuIsDisabledWhenIncognitoModeForced); 72 NewWindowMenuIsDisabledWhenIncognitoModeForced);
72 FRIEND_TEST_ALL_PREFIXES( 73 FRIEND_TEST_ALL_PREFIXES(
73 LauncherContextMenuTest, 74 LauncherContextMenuTest,
74 NoAutoHideOptionInMaximizedMode); 75 NoAutoHideOptionInMaximizedMode);
75 76
76 enum MenuItem { 77 enum MenuItem {
77 MENU_OPEN_NEW, 78 MENU_OPEN_NEW,
78 MENU_CLOSE, 79 MENU_CLOSE,
79 MENU_PIN, 80 MENU_PIN,
81 MENU_INSTALL,
80 LAUNCH_TYPE_PINNED_TAB, 82 LAUNCH_TYPE_PINNED_TAB,
81 LAUNCH_TYPE_REGULAR_TAB, 83 LAUNCH_TYPE_REGULAR_TAB,
82 LAUNCH_TYPE_FULLSCREEN, 84 LAUNCH_TYPE_FULLSCREEN,
83 LAUNCH_TYPE_WINDOW, 85 LAUNCH_TYPE_WINDOW,
84 MENU_AUTO_HIDE, 86 MENU_AUTO_HIDE,
85 MENU_NEW_WINDOW, 87 MENU_NEW_WINDOW,
86 MENU_NEW_INCOGNITO_WINDOW, 88 MENU_NEW_INCOGNITO_WINDOW,
87 MENU_ALIGNMENT_MENU, 89 MENU_ALIGNMENT_MENU,
88 #if defined(OS_CHROMEOS) 90 #if defined(OS_CHROMEOS)
89 MENU_CHANGE_WALLPAPER, 91 MENU_CHANGE_WALLPAPER,
(...skipping 14 matching lines...) Expand all
104 106
105 aura::Window* root_window_; 107 aura::Window* root_window_;
106 108
107 // Not owned. 109 // Not owned.
108 ash::ShelfItemDelegate* item_delegate_; 110 ash::ShelfItemDelegate* item_delegate_;
109 111
110 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); 112 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu);
111 }; 113 };
112 114
113 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 115 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698