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

Side by Side Diff: chrome/browser/ui/ash/launcher/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: Refactor and comments&inlucdes cleanup 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
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/desktop_background/user_wallpaper_delegate.h" 9 #include "ash/desktop_background/user_wallpaper_delegate.h"
10 #include "ash/metrics/user_metrics_recorder.h" 10 #include "ash/metrics/user_metrics_recorder.h"
11 #include "ash/session/session_state_delegate.h" 11 #include "ash/session/session_state_delegate.h"
12 #include "ash/shelf/shelf.h" 12 #include "ash/shelf/shelf.h"
13 #include "ash/shelf/shelf_item_delegate.h"
14 #include "ash/shelf/shelf_widget.h"
15 #include "ash/shell.h" 13 #include "ash/shell.h"
16 #include "base/bind.h"
17 #include "build/build_config.h" 14 #include "build/build_config.h"
18 #include "chrome/browser/extensions/context_menu_matcher.h"
19 #include "chrome/browser/extensions/extension_util.h"
20 #include "chrome/browser/fullscreen.h" 15 #include "chrome/browser/fullscreen.h"
21 #include "chrome/browser/prefs/incognito_mode_prefs.h"
22 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 17 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
24 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 18 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
25 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h"
20 #include "chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h"
26 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
27 #include "chrome/grit/generated_resources.h" 22 #include "chrome/grit/generated_resources.h"
28 #include "components/prefs/pref_service.h" 23 #include "components/prefs/pref_service.h"
29 #include "content/public/common/context_menu_params.h" 24 #include "content/public/common/context_menu_params.h"
30 #include "grit/ash_strings.h" 25 #include "grit/ash_strings.h"
31 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
32 27
28 #if defined(OS_CHROMEOS)
29 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
30 #endif // defined(OS_CHROMEOS)
31
33 namespace { 32 namespace {
34 33
35 bool MenuItemHasLauncherContext(const extensions::MenuItem* item) {
36 return item->contexts().Contains(extensions::MenuItem::LAUNCHER);
37 }
38
39 // Returns true if the user can modify the |shelf|'s auto-hide behavior. 34 // Returns true if the user can modify the |shelf|'s auto-hide behavior.
40 bool CanUserModifyShelfAutoHideBehavior(const Profile* profile) { 35 bool CanUserModifyShelfAutoHideBehavior(const Profile* profile) {
41 const std::string& pref = prefs::kShelfAutoHideBehaviorLocal; 36 const std::string& pref = prefs::kShelfAutoHideBehaviorLocal;
42 return profile->GetPrefs()->FindPreference(pref)->IsUserModifiable(); 37 return profile->GetPrefs()->FindPreference(pref)->IsUserModifiable();
43 } 38 }
44 39
45 } // namespace 40 } // namespace
46 41
42 // static
43 LauncherContextMenu* LauncherContextMenu::Create(
44 ChromeLauncherController* controller,
45 const ash::ShelfItem* item,
46 ash::Shelf* shelf) {
47 DCHECK(controller);
48 DCHECK(shelf);
49 // Create DesktopShellLauncherContextMenu if no item is selected
50 if (!item || item->id == 0)
51 return new DesktopShellLauncherContextMenu(controller, item, shelf);
52
53 // Create ArcLauncherContextMenu if the item is an Arc app
54 #if defined(OS_CHROMEOS)
55 const std::string& app_id = controller->GetAppIDForShelfID(item->id);
56 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(controller->profile());
57 DCHECK(arc_prefs);
58 if (arc_prefs->IsRegistered(app_id)) {
59 return new ArcLauncherContextMenu(controller, item, shelf);
60 }
61 #endif // defined(OS_CHROMEOS)
62
63 // Create ExtensionLauncherContextMenu for the item
64 return new ExtensionLauncherContextMenu(controller, item, shelf);
65 }
66
47 LauncherContextMenu::LauncherContextMenu(ChromeLauncherController* controller, 67 LauncherContextMenu::LauncherContextMenu(ChromeLauncherController* controller,
48 const ash::ShelfItem* item, 68 const ash::ShelfItem* item,
49 ash::Shelf* shelf) 69 ash::Shelf* shelf)
50 : ui::SimpleMenuModel(nullptr), 70 : ui::SimpleMenuModel(nullptr),
51 controller_(controller), 71 controller_(controller),
52 item_(item ? *item : ash::ShelfItem()), 72 item_(item ? *item : ash::ShelfItem()),
53 shelf_alignment_menu_(shelf), 73 shelf_alignment_menu_(shelf),
54 shelf_(shelf) { 74 shelf_(shelf) {
55 DCHECK(shelf_);
56 Init();
57 }
58
59 void LauncherContextMenu::Init() {
60 set_delegate(this); 75 set_delegate(this);
61
62 if (item_.id != 0) {
63 extension_items_.reset(new extensions::ContextMenuMatcher(
64 controller_->profile(), this, this,
65 base::Bind(MenuItemHasLauncherContext)));
66 if (item_.type == ash::TYPE_APP_SHORTCUT ||
67 item_.type == ash::TYPE_WINDOWED_APP) {
68 // V1 apps can be started from the menu - but V2 apps should not.
69 if (!controller_->IsPlatformApp(item_.id)) {
70 AddItem(MENU_OPEN_NEW, base::string16());
71 AddSeparator(ui::NORMAL_SEPARATOR);
72 }
73 const std::string app_id = controller_->GetAppIDForShelfID(item_.id);
74 int menu_pin_string_id;
75 if (!controller_->CanPin(app_id))
76 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_PIN_ENFORCED_BY_POLICY;
77 else if (controller_->IsPinned(item_.id))
78 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_UNPIN;
79 else
80 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_PIN;
81 AddItem(MENU_PIN, l10n_util::GetStringUTF16(menu_pin_string_id));
82 if (controller_->IsOpen(item_.id)) {
83 AddItem(MENU_CLOSE,
84 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
85 }
86 if (!controller_->IsPlatformApp(item_.id) &&
87 item_.type != ash::TYPE_WINDOWED_APP) {
88 AddSeparator(ui::NORMAL_SEPARATOR);
89 if (extensions::util::IsNewBookmarkAppsEnabled()) {
90 // With bookmark apps enabled, hosted apps launch in a window by
91 // default. This menu item is re-interpreted as a single, toggle-able
92 // option to launch the hosted app as a tab.
93 AddCheckItemWithStringId(LAUNCH_TYPE_WINDOW,
94 IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
95 } else {
96 AddCheckItemWithStringId(
97 LAUNCH_TYPE_REGULAR_TAB,
98 IDS_APP_CONTEXT_MENU_OPEN_REGULAR);
99 AddCheckItemWithStringId(
100 LAUNCH_TYPE_PINNED_TAB,
101 IDS_APP_CONTEXT_MENU_OPEN_PINNED);
102 AddCheckItemWithStringId(
103 LAUNCH_TYPE_WINDOW,
104 IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
105 // Even though the launch type is Full Screen it is more accurately
106 // described as Maximized in Ash.
107 AddCheckItemWithStringId(
108 LAUNCH_TYPE_FULLSCREEN,
109 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED);
110 }
111 }
112 } else if (item_.type == ash::TYPE_BROWSER_SHORTCUT) {
113 AddItem(MENU_NEW_WINDOW,
114 l10n_util::GetStringUTF16(IDS_APP_LIST_NEW_WINDOW));
115 if (!controller_->IsLoggedInAsGuest()) {
116 AddItem(MENU_NEW_INCOGNITO_WINDOW,
117 l10n_util::GetStringUTF16(IDS_APP_LIST_NEW_INCOGNITO_WINDOW));
118 }
119 } else if (item_.type == ash::TYPE_DIALOG) {
120 AddItem(MENU_CLOSE,
121 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
122 } else {
123 if (item_.type == ash::TYPE_PLATFORM_APP) {
124 AddItem(
125 MENU_PIN,
126 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN));
127 }
128 bool show_close_button = controller_->IsOpen(item_.id);
129 #if defined(OS_CHROMEOS)
130 if (extension_misc::IsImeMenuExtensionId(
131 controller_->GetAppIDForShelfID(item_.id))) {
132 show_close_button = false;
133 }
134 #endif
135 if (show_close_button) {
136 AddItem(MENU_CLOSE,
137 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
138 }
139 }
140 AddSeparator(ui::NORMAL_SEPARATOR);
141 if (item_.type == ash::TYPE_APP_SHORTCUT ||
142 item_.type == ash::TYPE_WINDOWED_APP ||
143 item_.type == ash::TYPE_PLATFORM_APP) {
144 const extensions::MenuItem::ExtensionKey app_key(
145 controller_->GetAppIDForShelfID(item_.id));
146 if (!app_key.empty()) {
147 int index = 0;
148 extension_items_->AppendExtensionItems(app_key,
149 base::string16(),
150 &index,
151 false); // is_action_menu
152 AddSeparator(ui::NORMAL_SEPARATOR);
153 }
154 }
155 }
156 // In fullscreen, the launcher is either hidden or autohidden depending on the
157 // type of fullscreen. Do not show the auto-hide menu item while in fullscreen
158 // because it is confusing when the preference appears not to apply.
159 if (!IsFullScreenMode() &&
160 CanUserModifyShelfAutoHideBehavior(controller_->profile())) {
161 AddCheckItemWithStringId(MENU_AUTO_HIDE,
162 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE);
163 }
164 if (ash::ShelfWidget::ShelfAlignmentAllowed() &&
165 !ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) {
166 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
167 IDS_ASH_SHELF_CONTEXT_MENU_POSITION,
168 &shelf_alignment_menu_);
169 }
170 #if defined(OS_CHROMEOS)
171 if (!controller_->IsLoggedInAsGuest()) {
172 AddItem(MENU_CHANGE_WALLPAPER,
173 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
174 }
175 #endif
176 } 76 }
177 77
178 LauncherContextMenu::~LauncherContextMenu() { 78 LauncherContextMenu::~LauncherContextMenu() {
179 } 79 }
180 80
181 bool LauncherContextMenu::IsItemForCommandIdDynamic(int command_id) const { 81 bool LauncherContextMenu::IsItemForCommandIdDynamic(int command_id) const {
182 return command_id == MENU_OPEN_NEW; 82 return false;
183 } 83 }
184 84
185 base::string16 LauncherContextMenu::GetLabelForCommandId(int command_id) const { 85 base::string16 LauncherContextMenu::GetLabelForCommandId(int command_id) const {
186 if (command_id == MENU_OPEN_NEW) {
187 if (item_.type == ash::TYPE_PLATFORM_APP) {
188 return l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW);
189 }
190 switch (controller_->GetLaunchType(item_.id)) {
191 case extensions::LAUNCH_TYPE_PINNED:
192 case extensions::LAUNCH_TYPE_REGULAR:
193 return l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_TAB);
194 case extensions::LAUNCH_TYPE_FULLSCREEN:
195 case extensions::LAUNCH_TYPE_WINDOW:
196 return l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW);
197 default:
198 NOTREACHED();
199 return base::string16();
200 }
201 }
202 NOTREACHED(); 86 NOTREACHED();
203 return base::string16(); 87 return base::string16();
204 } 88 }
205 89
206 bool LauncherContextMenu::IsCommandIdChecked(int command_id) const { 90 bool LauncherContextMenu::IsCommandIdChecked(int command_id) const {
207 switch (command_id) { 91 if (command_id == MENU_AUTO_HIDE)
208 case LAUNCH_TYPE_PINNED_TAB: 92 return shelf_->GetAutoHideBehavior() ==
khmel 2016/03/30 00:58:46 you have > 1 line here, Please { }
lgcheng 2016/03/30 02:06:25 Done.
209 return controller_->GetLaunchType(item_.id) == 93 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
210 extensions::LAUNCH_TYPE_PINNED; 94 NOTREACHED();
211 case LAUNCH_TYPE_REGULAR_TAB: 95 return false;
212 return controller_->GetLaunchType(item_.id) ==
213 extensions::LAUNCH_TYPE_REGULAR;
214 case LAUNCH_TYPE_WINDOW:
215 return controller_->GetLaunchType(item_.id) ==
216 extensions::LAUNCH_TYPE_WINDOW;
217 case LAUNCH_TYPE_FULLSCREEN:
218 return controller_->GetLaunchType(item_.id) ==
219 extensions::LAUNCH_TYPE_FULLSCREEN;
220 case MENU_AUTO_HIDE:
221 return shelf_->GetAutoHideBehavior() ==
222 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
223 default:
224 if (command_id < MENU_ITEM_COUNT)
225 return false;
226 return (extension_items_ &&
227 extension_items_->IsCommandIdChecked(command_id));
228 }
229 } 96 }
230 97
231 bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const { 98 bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const {
232 switch (command_id) { 99 switch (command_id) {
100 case MENU_CLOSE:
khmel 2016/03/30 00:58:46 Please don't add untested code, this is functional
lgcheng 2016/03/30 02:06:25 Changed back to original implementation
101 return controller()->IsOpen(item().id);
233 case MENU_PIN: 102 case MENU_PIN:
234 return controller_->IsPinnable(item_.id); 103 return controller()->IsPinnable(item().id);
235 case MENU_CHANGE_WALLPAPER: 104 case MENU_CHANGE_WALLPAPER:
236 return ash::Shell::GetInstance()->user_wallpaper_delegate()-> 105 return ash::Shell::GetInstance()
237 CanOpenSetWallpaperPage(); 106 ->user_wallpaper_delegate()
238 case MENU_NEW_WINDOW: 107 ->CanOpenSetWallpaperPage();
239 // "Normal" windows are not allowed when incognito is enforced.
240 return IncognitoModePrefs::GetAvailability(
241 controller_->profile()->GetPrefs()) != IncognitoModePrefs::FORCED;
242 case MENU_AUTO_HIDE: 108 case MENU_AUTO_HIDE:
243 return CanUserModifyShelfAutoHideBehavior(controller_->profile()); 109 return CanUserModifyShelfAutoHideBehavior(controller_->profile());
244 case MENU_NEW_INCOGNITO_WINDOW: 110 case MENU_ALIGNMENT_MENU:
245 // Incognito windows are not allowed when incognito is disabled. 111 return true;
246 return IncognitoModePrefs::GetAvailability(
247 controller_->profile()->GetPrefs()) != IncognitoModePrefs::DISABLED;
248 default: 112 default:
249 if (command_id < MENU_ITEM_COUNT) 113 NOTREACHED();
250 return true; 114 return false;
251 return (extension_items_ &&
252 extension_items_->IsCommandIdEnabled(command_id));
253 } 115 }
254 } 116 }
255 117
256 bool LauncherContextMenu::GetAcceleratorForCommandId( 118 bool LauncherContextMenu::GetAcceleratorForCommandId(
257 int command_id, 119 int command_id,
258 ui::Accelerator* accelerator) { 120 ui::Accelerator* accelerator) {
259 return false; 121 return false;
260 } 122 }
261 123
262 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) { 124 void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
(...skipping 12 matching lines...) Expand all
275 } else { 137 } else {
276 // TODO(simonhong): Use ShelfItemDelegate::Close(). 138 // TODO(simonhong): Use ShelfItemDelegate::Close().
277 controller_->Close(item_.id); 139 controller_->Close(item_.id);
278 } 140 }
279 ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction( 141 ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
280 ash::UMA_CLOSE_THROUGH_CONTEXT_MENU); 142 ash::UMA_CLOSE_THROUGH_CONTEXT_MENU);
281 break; 143 break;
282 case MENU_PIN: 144 case MENU_PIN:
283 controller_->TogglePinned(item_.id); 145 controller_->TogglePinned(item_.id);
284 break; 146 break;
285 case LAUNCH_TYPE_PINNED_TAB:
286 controller_->SetLaunchType(item_.id, extensions::LAUNCH_TYPE_PINNED);
287 break;
288 case LAUNCH_TYPE_REGULAR_TAB:
289 controller_->SetLaunchType(item_.id, extensions::LAUNCH_TYPE_REGULAR);
290 break;
291 case LAUNCH_TYPE_WINDOW: {
292 extensions::LaunchType launch_type = extensions::LAUNCH_TYPE_WINDOW;
293 // With bookmark apps enabled, hosted apps can only toggle between
294 // LAUNCH_WINDOW and LAUNCH_REGULAR.
295 if (extensions::util::IsNewBookmarkAppsEnabled()) {
296 launch_type = controller_->GetLaunchType(item_.id) ==
297 extensions::LAUNCH_TYPE_WINDOW
298 ? extensions::LAUNCH_TYPE_REGULAR
299 : extensions::LAUNCH_TYPE_WINDOW;
300 }
301 controller_->SetLaunchType(item_.id, launch_type);
302 break;
303 }
304 case LAUNCH_TYPE_FULLSCREEN:
305 controller_->SetLaunchType(item_.id, extensions::LAUNCH_TYPE_FULLSCREEN);
306 break;
307 case MENU_AUTO_HIDE: 147 case MENU_AUTO_HIDE:
308 shelf_->SetAutoHideBehavior(shelf_->GetAutoHideBehavior() == 148 shelf_->SetAutoHideBehavior(shelf_->GetAutoHideBehavior() ==
309 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS 149 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS
310 ? ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER 150 ? ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER
311 : ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 151 : ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
312 break; 152 break;
313 case MENU_NEW_WINDOW:
314 controller_->CreateNewWindow();
315 break;
316 case MENU_NEW_INCOGNITO_WINDOW:
317 controller_->CreateNewIncognitoWindow();
318 break;
319 case MENU_ALIGNMENT_MENU: 153 case MENU_ALIGNMENT_MENU:
320 break; 154 break;
321 case MENU_CHANGE_WALLPAPER: 155 case MENU_CHANGE_WALLPAPER:
322 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 156 ash::Shell::GetInstance()->user_wallpaper_delegate()->
323 OpenSetWallpaperPage(); 157 OpenSetWallpaperPage();
324 break; 158 break;
325 default: 159 default:
326 if (extension_items_) { 160 NOTREACHED();
327 extension_items_->ExecuteCommand(command_id, nullptr, nullptr,
328 content::ContextMenuParams());
329 }
330 } 161 }
331 } 162 }
163
164 void LauncherContextMenu::AddPinMenu() {
165 // Expect an item with a none zero id to add pin/unpin menu item
166 DCHECK(item_.id);
167 const std::string app_id = controller_->GetAppIDForShelfID(item_.id);
168 int menu_pin_string_id;
169 if (!controller_->CanPin(app_id))
170 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_PIN_ENFORCED_BY_POLICY;
171 else if (controller_->IsPinned(item_.id))
172 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_UNPIN;
173 else
174 menu_pin_string_id = IDS_LAUNCHER_CONTEXT_MENU_PIN;
175 AddItem(MENU_PIN, l10n_util::GetStringUTF16(menu_pin_string_id));
176 }
177
178 void LauncherContextMenu::AddAutohideAlignmentWallpaperMenu() {
179 // In fullscreen, the launcher is either hidden or autohidden depending
180 // on thethe type of fullscreen. Do not show the auto-hide menu item while in
181 // while in fullscreen because it is confusing when the preference appears
182 // not to apply.
183 if (!IsFullScreenMode() &&
184 CanUserModifyShelfAutoHideBehavior(controller_->profile())) {
185 AddCheckItemWithStringId(MENU_AUTO_HIDE,
186 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE);
187 }
188 if (ash::ShelfWidget::ShelfAlignmentAllowed() &&
189 !ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) {
190 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
191 IDS_ASH_SHELF_CONTEXT_MENU_POSITION,
192 &shelf_alignment_menu_);
193 }
194 #if defined(OS_CHROMEOS)
195 if (!controller_->IsLoggedInAsGuest()) {
196 AddItem(MENU_CHANGE_WALLPAPER,
197 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
198 }
199 #endif
200 }
201
202 bool LauncherContextMenu::IsCommonCommandId(int command_id) const {
203 switch (command_id) {
204 case MENU_CLOSE:
205 case MENU_PIN:
206 case MENU_AUTO_HIDE:
207 case MENU_ALIGNMENT_MENU:
208 case MENU_CHANGE_WALLPAPER:
209 return true;
210 default:
211 return false;
212 }
213 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698