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

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

Issue 1611463002: Remove the close button in context menu for IME menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync up to date. Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 } else if (item_.type == ash::TYPE_DIALOG) { 144 } else if (item_.type == ash::TYPE_DIALOG) {
145 AddItem(MENU_CLOSE, 145 AddItem(MENU_CLOSE,
146 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 146 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
147 } else { 147 } else {
148 if (item_.type == ash::TYPE_PLATFORM_APP) { 148 if (item_.type == ash::TYPE_PLATFORM_APP) {
149 AddItem( 149 AddItem(
150 MENU_PIN, 150 MENU_PIN,
151 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN)); 151 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN));
152 } 152 }
153 if (controller_->IsOpen(item_.id)) { 153 bool show_close_button = controller_->IsOpen(item_.id);
154 #if defined(OS_CHROMEOS)
155 if (extension_misc::IsImeMenuExtensionId(
156 controller_->GetAppIDForShelfID(item_.id))) {
157 show_close_button = false;
158 }
159 #endif
160 if (show_close_button) {
154 AddItem(MENU_CLOSE, 161 AddItem(MENU_CLOSE,
155 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 162 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
156 } 163 }
157 } 164 }
158 AddSeparator(ui::NORMAL_SEPARATOR); 165 AddSeparator(ui::NORMAL_SEPARATOR);
159 if (item_.type == ash::TYPE_APP_SHORTCUT || 166 if (item_.type == ash::TYPE_APP_SHORTCUT ||
160 item_.type == ash::TYPE_WINDOWED_APP || 167 item_.type == ash::TYPE_WINDOWED_APP ||
161 item_.type == ash::TYPE_PLATFORM_APP) { 168 item_.type == ash::TYPE_PLATFORM_APP) {
162 const extensions::MenuItem::ExtensionKey app_key( 169 const extensions::MenuItem::ExtensionKey app_key(
163 controller_->GetAppIDForShelfID(item_.id)); 170 controller_->GetAppIDForShelfID(item_.id));
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 case MENU_CHANGE_WALLPAPER: 337 case MENU_CHANGE_WALLPAPER:
331 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 338 ash::Shell::GetInstance()->user_wallpaper_delegate()->
332 OpenSetWallpaperPage(); 339 OpenSetWallpaperPage();
333 break; 340 break;
334 #endif 341 #endif
335 default: 342 default:
336 extension_items_->ExecuteCommand(command_id, NULL, 343 extension_items_->ExecuteCommand(command_id, NULL,
337 content::ContextMenuParams()); 344 content::ContextMenuParams());
338 } 345 }
339 } 346 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698