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