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

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

Issue 134653005: Don't show the Autohide Shelf menu option when it's unsupported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't show the Autohide shelf option when it's unsupported. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 app_id, base::string16(), &index); 164 app_id, base::string16(), &index);
165 AddSeparator(ui::NORMAL_SEPARATOR); 165 AddSeparator(ui::NORMAL_SEPARATOR);
166 } 166 }
167 } 167 }
168 } 168 }
169 // In fullscreen, the launcher is either hidden or autohidden depending on 169 // In fullscreen, the launcher is either hidden or autohidden depending on
170 // the type of fullscreen. Do not show the auto-hide menu item while in 170 // the type of fullscreen. Do not show the auto-hide menu item while in
171 // fullscreen because it is confusing when the preference appears not to 171 // fullscreen because it is confusing when the preference appears not to
172 // apply. 172 // apply.
173 if (!IsFullScreenMode()) { 173 if (!IsFullScreenMode()) {
174 AddCheckItemWithStringId(MENU_AUTO_HIDE, 174 if ((controller_->GetShelfAutoHideBehavior(root_window_) !=
175 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE); 175 ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER) ||
Mr4D (OOO till 08-26) 2014/01/10 21:55:34 Please remove the first check. since that is not n
176 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) {
177 AddCheckItemWithStringId(MENU_AUTO_HIDE,
178 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE);
179 }
176 } 180 }
177 if (ash::ShelfWidget::ShelfAlignmentAllowed()) { 181 if (ash::ShelfWidget::ShelfAlignmentAllowed()) {
178 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, 182 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
179 IDS_ASH_SHELF_CONTEXT_MENU_POSITION, 183 IDS_ASH_SHELF_CONTEXT_MENU_POSITION,
180 &shelf_alignment_menu_); 184 &shelf_alignment_menu_);
181 } 185 }
182 #if defined(OS_CHROMEOS) 186 #if defined(OS_CHROMEOS)
183 AddItem(MENU_CHANGE_WALLPAPER, 187 AddItem(MENU_CHANGE_WALLPAPER,
184 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); 188 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
185 #endif 189 #endif
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 case MENU_CHANGE_WALLPAPER: 327 case MENU_CHANGE_WALLPAPER:
324 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 328 ash::Shell::GetInstance()->user_wallpaper_delegate()->
325 OpenSetWallpaperPage(); 329 OpenSetWallpaperPage();
326 break; 330 break;
327 #endif 331 #endif
328 default: 332 default:
329 extension_items_->ExecuteCommand(command_id, NULL, 333 extension_items_->ExecuteCommand(command_id, NULL,
330 content::ContextMenuParams()); 334 content::ContextMenuParams());
331 } 335 }
332 } 336 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698