| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 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::IsStreamlinedHostedAppsEnabled()) { | 242 if (extensions::util::IsNewBookmarkAppsEnabled()) { |
| 243 AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP); | 243 AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP); |
| 244 AddSeparator(ui::NORMAL_SEPARATOR); | 244 AddSeparator(ui::NORMAL_SEPARATOR); |
| 245 } else if (show_create_shortcuts) { | 245 } else if (show_create_shortcuts) { |
| 246 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); | 246 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); |
| 247 AddSeparator(ui::NORMAL_SEPARATOR); | 247 AddSeparator(ui::NORMAL_SEPARATOR); |
| 248 } | 248 } |
| 249 | 249 |
| 250 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); | 250 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); |
| 251 | 251 |
| 252 if (chrome::CanOpenTaskManager()) | 252 if (chrome::CanOpenTaskManager()) |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 ->GetZoomPercent(); | 1069 ->GetZoomPercent(); |
| 1070 } | 1070 } |
| 1071 zoom_label_ = l10n_util::GetStringFUTF16( | 1071 zoom_label_ = l10n_util::GetStringFUTF16( |
| 1072 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 1072 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 void WrenchMenuModel::OnZoomLevelChanged( | 1075 void WrenchMenuModel::OnZoomLevelChanged( |
| 1076 const content::HostZoomMap::ZoomLevelChange& change) { | 1076 const content::HostZoomMap::ZoomLevelChange& change) { |
| 1077 UpdateZoomControls(); | 1077 UpdateZoomControls(); |
| 1078 } | 1078 } |
| OLD | NEW |