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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 } | 155 } |
156 AddSeparator(ui::NORMAL_SEPARATOR); | 156 AddSeparator(ui::NORMAL_SEPARATOR); |
157 if (item_.type == ash::TYPE_APP_SHORTCUT || | 157 if (item_.type == ash::TYPE_APP_SHORTCUT || |
158 item_.type == ash::TYPE_WINDOWED_APP || | 158 item_.type == ash::TYPE_WINDOWED_APP || |
159 item_.type == ash::TYPE_PLATFORM_APP) { | 159 item_.type == ash::TYPE_PLATFORM_APP) { |
160 const extensions::MenuItem::ExtensionKey app_key( | 160 const extensions::MenuItem::ExtensionKey app_key( |
161 controller_->GetAppIDForShelfID(item_.id)); | 161 controller_->GetAppIDForShelfID(item_.id)); |
162 if (!app_key.empty()) { | 162 if (!app_key.empty()) { |
163 int index = 0; | 163 int index = 0; |
164 extension_items_->AppendExtensionItems( | 164 extension_items_->AppendExtensionItems(app_key, |
165 app_key, base::string16(), &index); | 165 base::string16(), |
| 166 &index, |
| 167 false); // is_action_menu |
166 AddSeparator(ui::NORMAL_SEPARATOR); | 168 AddSeparator(ui::NORMAL_SEPARATOR); |
167 } | 169 } |
168 } | 170 } |
169 } | 171 } |
170 // In fullscreen, the launcher is either hidden or autohidden depending on | 172 // In fullscreen, the launcher is either hidden or autohidden depending on |
171 // the type of fullscreen. Do not show the auto-hide menu item while in | 173 // the type of fullscreen. Do not show the auto-hide menu item while in |
172 // fullscreen because it is confusing when the preference appears not to | 174 // fullscreen because it is confusing when the preference appears not to |
173 // apply. | 175 // apply. |
174 if (!IsFullScreenMode() && | 176 if (!IsFullScreenMode() && |
175 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) { | 177 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 case MENU_CHANGE_WALLPAPER: | 344 case MENU_CHANGE_WALLPAPER: |
343 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 345 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
344 OpenSetWallpaperPage(); | 346 OpenSetWallpaperPage(); |
345 break; | 347 break; |
346 #endif | 348 #endif |
347 default: | 349 default: |
348 extension_items_->ExecuteCommand(command_id, NULL, | 350 extension_items_->ExecuteCommand(command_id, NULL, |
349 content::ContextMenuParams()); | 351 content::ContextMenuParams()); |
350 } | 352 } |
351 } | 353 } |
OLD | NEW |