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/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 app_id, string16(), &index); | 134 app_id, string16(), &index); |
135 AddSeparator(ui::NORMAL_SEPARATOR); | 135 AddSeparator(ui::NORMAL_SEPARATOR); |
136 } | 136 } |
137 } | 137 } |
138 } | 138 } |
139 // In fullscreen, the launcher is either hidden or autohidden depending on | 139 // In fullscreen, the launcher is either hidden or autohidden depending on |
140 // the type of fullscreen. Do not show the auto-hide menu item while in | 140 // the type of fullscreen. Do not show the auto-hide menu item while in |
141 // fullscreen because it is confusing when the preference appears not to | 141 // fullscreen because it is confusing when the preference appears not to |
142 // apply. | 142 // apply. |
143 if (!IsFullScreenMode()) { | 143 if (!IsFullScreenMode()) { |
144 AddCheckItemWithStringId( | 144 AddCheckItemWithStringId(MENU_AUTO_HIDE, |
145 MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE); | 145 IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE); |
146 } | 146 } |
147 if (CommandLine::ForCurrentProcess()->HasSwitch( | 147 if (CommandLine::ForCurrentProcess()->HasSwitch( |
148 switches::kShowLauncherAlignmentMenu)) { | 148 switches::kShowShelfAlignmentMenu)) { |
149 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, | 149 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, |
150 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION, | 150 IDS_ASH_SHELF_CONTEXT_MENU_POSITION, |
151 &launcher_alignment_menu_); | 151 &launcher_alignment_menu_); |
152 } | 152 } |
153 #if defined(OS_CHROMEOS) | 153 #if defined(OS_CHROMEOS) |
154 AddItem(MENU_CHANGE_WALLPAPER, | 154 AddItem(MENU_CHANGE_WALLPAPER, |
155 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); | 155 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); |
156 #endif | 156 #endif |
157 } | 157 } |
158 | 158 |
159 LauncherContextMenu::~LauncherContextMenu() { | 159 LauncherContextMenu::~LauncherContextMenu() { |
160 } | 160 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 case MENU_CHANGE_WALLPAPER: | 278 case MENU_CHANGE_WALLPAPER: |
279 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 279 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
280 OpenSetWallpaperPage(); | 280 OpenSetWallpaperPage(); |
281 break; | 281 break; |
282 #endif | 282 #endif |
283 default: | 283 default: |
284 extension_items_->ExecuteCommand(command_id, NULL, | 284 extension_items_->ExecuteCommand(command_id, NULL, |
285 content::ContextMenuParams()); | 285 content::ContextMenuParams()); |
286 } | 286 } |
287 } | 287 } |
OLD | NEW |