| OLD | NEW |
| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 extension_items_->AppendExtensionItems( | 163 extension_items_->AppendExtensionItems( |
| 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 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) { |
| 174 AddCheckItemWithStringId(MENU_AUTO_HIDE, | 175 AddCheckItemWithStringId(MENU_AUTO_HIDE, |
| 175 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE); | 176 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE); |
| 176 } | 177 } |
| 177 if (ash::ShelfWidget::ShelfAlignmentAllowed()) { | 178 if (ash::ShelfWidget::ShelfAlignmentAllowed()) { |
| 178 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, | 179 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, |
| 179 IDS_ASH_SHELF_CONTEXT_MENU_POSITION, | 180 IDS_ASH_SHELF_CONTEXT_MENU_POSITION, |
| 180 &shelf_alignment_menu_); | 181 &shelf_alignment_menu_); |
| 181 } | 182 } |
| 182 #if defined(OS_CHROMEOS) | 183 #if defined(OS_CHROMEOS) |
| 183 AddItem(MENU_CHANGE_WALLPAPER, | 184 AddItem(MENU_CHANGE_WALLPAPER, |
| 184 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); | 185 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); |
| 185 #endif | 186 #endif |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 case MENU_CHANGE_WALLPAPER: | 324 case MENU_CHANGE_WALLPAPER: |
| 324 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 325 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
| 325 OpenSetWallpaperPage(); | 326 OpenSetWallpaperPage(); |
| 326 break; | 327 break; |
| 327 #endif | 328 #endif |
| 328 default: | 329 default: |
| 329 extension_items_->ExecuteCommand(command_id, NULL, | 330 extension_items_->ExecuteCommand(command_id, NULL, |
| 330 content::ContextMenuParams()); | 331 content::ContextMenuParams()); |
| 331 } | 332 } |
| 332 } | 333 } |
| OLD | NEW |