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

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

Issue 359493005: Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed AppendExtensionItemsImpl, minor cleanup, comments Created 6 years, 5 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 true); // include_icons
Yoyo Zhou 2014/07/15 23:35:00 ditto
gpdavis 2014/07/16 01:11:10 Done.
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698