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

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

Issue 186213003: <webview>: Context menu API implementation CL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 6 years, 9 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 if (controller_->IsOpen(item_.id)) { 150 if (controller_->IsOpen(item_.id)) {
151 AddItem(MENU_CLOSE, 151 AddItem(MENU_CLOSE,
152 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 152 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
153 } 153 }
154 } 154 }
155 AddSeparator(ui::NORMAL_SEPARATOR); 155 AddSeparator(ui::NORMAL_SEPARATOR);
156 if (item_.type == ash::TYPE_APP_SHORTCUT || 156 if (item_.type == ash::TYPE_APP_SHORTCUT ||
157 item_.type == ash::TYPE_WINDOWED_APP || 157 item_.type == ash::TYPE_WINDOWED_APP ||
158 item_.type == ash::TYPE_PLATFORM_APP) { 158 item_.type == ash::TYPE_PLATFORM_APP) {
159 std::string app_id = controller_->GetAppIDForShelfID(item_.id); 159 const extensions::MenuItem::ExtensionKey app_key(
160 if (!app_id.empty()) { 160 controller_->GetAppIDForShelfID(item_.id));
161 if (!app_key.empty()) {
161 int index = 0; 162 int index = 0;
162 extension_items_->AppendExtensionItems( 163 extension_items_->AppendExtensionItems(
163 app_id, base::string16(), &index); 164 app_key, base::string16(), &index);
164 AddSeparator(ui::NORMAL_SEPARATOR); 165 AddSeparator(ui::NORMAL_SEPARATOR);
165 } 166 }
166 } 167 }
167 } 168 }
168 // In fullscreen, the launcher is either hidden or autohidden depending on 169 // In fullscreen, the launcher is either hidden or autohidden depending on
169 // 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
170 // fullscreen because it is confusing when the preference appears not to 171 // fullscreen because it is confusing when the preference appears not to
171 // apply. 172 // apply.
172 if (!IsFullScreenMode() && 173 if (!IsFullScreenMode() &&
173 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) { 174 controller_->CanUserModifyShelfAutoHideBehavior(root_window_)) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_context_menu.cc ('k') | chrome/renderer/resources/extensions/webview_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698