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

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

Issue 1960293003: Remove OS_CHROMEOS from ui/ash code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/extension_launcher_context_menu.h" 5 #include "chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h"
6 6
7 #include "ash/shelf/shelf.h" 7 #include "ash/shelf/shelf.h"
8 #include "ash/shelf/shelf_item_delegate.h" 8 #include "ash/shelf/shelf_item_delegate.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/extensions/context_menu_matcher.h" 10 #include "chrome/browser/extensions/context_menu_matcher.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (!controller()->IsLoggedInAsGuest()) { 78 if (!controller()->IsLoggedInAsGuest()) {
79 AddItemWithStringId(MENU_NEW_INCOGNITO_WINDOW, 79 AddItemWithStringId(MENU_NEW_INCOGNITO_WINDOW,
80 IDS_APP_LIST_NEW_INCOGNITO_WINDOW); 80 IDS_APP_LIST_NEW_INCOGNITO_WINDOW);
81 } 81 }
82 } else if (item().type == ash::TYPE_DIALOG) { 82 } else if (item().type == ash::TYPE_DIALOG) {
83 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); 83 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE);
84 } else { 84 } else {
85 if (item().type == ash::TYPE_PLATFORM_APP) 85 if (item().type == ash::TYPE_PLATFORM_APP)
86 AddPinMenu(); 86 AddPinMenu();
87 bool show_close_button = controller()->IsOpen(item().id); 87 bool show_close_button = controller()->IsOpen(item().id);
88 #if defined(OS_CHROMEOS)
89 if (extension_misc::IsImeMenuExtensionId( 88 if (extension_misc::IsImeMenuExtensionId(
90 controller()->GetAppIDForShelfID(item().id))) 89 controller()->GetAppIDForShelfID(item().id))) {
91 show_close_button = false; 90 show_close_button = false;
92 #endif 91 }
92
93 if (show_close_button) 93 if (show_close_button)
94 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); 94 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE);
95 } 95 }
96 AddSeparator(ui::NORMAL_SEPARATOR); 96 AddSeparator(ui::NORMAL_SEPARATOR);
97 if (item().type == ash::TYPE_APP_SHORTCUT || 97 if (item().type == ash::TYPE_APP_SHORTCUT ||
98 item().type == ash::TYPE_WINDOWED_APP || 98 item().type == ash::TYPE_WINDOWED_APP ||
99 item().type == ash::TYPE_PLATFORM_APP) { 99 item().type == ash::TYPE_PLATFORM_APP) {
100 const extensions::MenuItem::ExtensionKey app_key( 100 const extensions::MenuItem::ExtensionKey app_key(
101 controller()->GetAppIDForShelfID(item().id)); 101 controller()->GetAppIDForShelfID(item().id));
102 if (!app_key.empty()) { 102 if (!app_key.empty()) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 case MENU_NEW_INCOGNITO_WINDOW: 211 case MENU_NEW_INCOGNITO_WINDOW:
212 controller()->CreateNewIncognitoWindow(); 212 controller()->CreateNewIncognitoWindow();
213 break; 213 break;
214 default: 214 default:
215 if (extension_items_) { 215 if (extension_items_) {
216 extension_items_->ExecuteCommand(command_id, nullptr, nullptr, 216 extension_items_->ExecuteCommand(command_id, nullptr, nullptr,
217 content::ContextMenuParams()); 217 content::ContextMenuParams());
218 } 218 }
219 } 219 }
220 } 220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698