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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 907473002: Polish UI of bookmark app creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another whoopsie Created 5 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
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/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 void ToolsMenuModel::Build(Browser* browser) { 233 void ToolsMenuModel::Build(Browser* browser) {
234 bool show_create_shortcuts = true; 234 bool show_create_shortcuts = true;
235 #if defined(OS_CHROMEOS) || defined(OS_MACOSX) 235 #if defined(OS_CHROMEOS) || defined(OS_MACOSX)
236 show_create_shortcuts = false; 236 show_create_shortcuts = false;
237 #elif defined(USE_ASH) 237 #elif defined(USE_ASH)
238 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) 238 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
239 show_create_shortcuts = false; 239 show_create_shortcuts = false;
240 #endif 240 #endif
241 241
242 if (extensions::util::IsNewBookmarkAppsEnabled()) { 242 if (extensions::util::IsNewBookmarkAppsEnabled()) {
243 AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP); 243 #if defined(OS_MACOSX)
244 int string_id = IDS_ADD_TO_DOCK;
245 #elif defined(OS_WIN)
246 int string_id = IDS_ADD_TO_TASKBAR;
247 #else
248 int string_id = IDS_ADD_TO_DESKTOP;
sashab 2015/02/06 15:45:22 Not needed if they all use the same string ID.
benwells 2015/02/06 15:52:17 Yes I understand. As described earlier I think it
249 #endif
250 #if defined(USE_ASH)
251 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
252 string_id = IDS_ADD_TO_SHELF;
253 #endif
254 AddItemWithStringId(IDC_CREATE_HOSTED_APP, string_id);
244 AddSeparator(ui::NORMAL_SEPARATOR); 255 AddSeparator(ui::NORMAL_SEPARATOR);
245 } else if (show_create_shortcuts) { 256 } else if (show_create_shortcuts) {
246 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); 257 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS);
247 AddSeparator(ui::NORMAL_SEPARATOR); 258 AddSeparator(ui::NORMAL_SEPARATOR);
248 } 259 }
249 260
250 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); 261 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
251 262
252 if (chrome::CanOpenTaskManager()) 263 if (chrome::CanOpenTaskManager())
253 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 264 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 ->GetZoomPercent(); 1084 ->GetZoomPercent();
1074 } 1085 }
1075 zoom_label_ = l10n_util::GetStringFUTF16( 1086 zoom_label_ = l10n_util::GetStringFUTF16(
1076 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 1087 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
1077 } 1088 }
1078 1089
1079 void WrenchMenuModel::OnZoomLevelChanged( 1090 void WrenchMenuModel::OnZoomLevelChanged(
1080 const content::HostZoomMap::ZoomLevelChange& change) { 1091 const content::HostZoomMap::ZoomLevelChange& change) {
1081 UpdateZoomControls(); 1092 UpdateZoomControls();
1082 } 1093 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698