OLD | NEW |
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 Loading... |
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; |
| 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 Loading... |
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 } |
OLD | NEW |