| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/wrench_menu_model.h" | 5 #include "chrome/browser/wrench_menu_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // TODO(port): Move to the above. | 213 // TODO(port): Move to the above. |
| 214 CreateCutCopyPaste(); | 214 CreateCutCopyPaste(); |
| 215 #endif | 215 #endif |
| 216 | 216 |
| 217 AddSeparator(); | 217 AddSeparator(); |
| 218 #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) | 218 #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) |
| 219 // WARNING: See above comment. | 219 // WARNING: See above comment. |
| 220 zoom_menu_item_model_.reset( | 220 zoom_menu_item_model_.reset( |
| 221 new menus::ButtonMenuItemModel(IDS_ZOOM_MENU, this)); | 221 new menus::ButtonMenuItemModel(IDS_ZOOM_MENU, this)); |
| 222 zoom_menu_item_model_->AddGroupItemWithStringId( | 222 zoom_menu_item_model_->AddGroupItemWithStringId( |
| 223 IDC_ZOOM_PLUS, IDS_ZOOM_PLUS2); | 223 IDC_ZOOM_MINUS, IDS_ZOOM_MINUS2); |
| 224 zoom_menu_item_model_->AddButtonLabel(IDC_ZOOM_PERCENT_DISPLAY, | 224 zoom_menu_item_model_->AddButtonLabel(IDC_ZOOM_PERCENT_DISPLAY, |
| 225 IDS_ZOOM_PLUS2); | 225 IDS_ZOOM_PLUS2); |
| 226 zoom_menu_item_model_->AddGroupItemWithStringId( | 226 zoom_menu_item_model_->AddGroupItemWithStringId( |
| 227 IDC_ZOOM_MINUS, IDS_ZOOM_MINUS2); | 227 IDC_ZOOM_PLUS, IDS_ZOOM_PLUS2); |
| 228 zoom_menu_item_model_->AddSpace(); | 228 zoom_menu_item_model_->AddSpace(); |
| 229 zoom_menu_item_model_->AddItemWithImage( | 229 zoom_menu_item_model_->AddItemWithImage( |
| 230 IDC_FULLSCREEN, IDR_FULLSCREEN_MENU_BUTTON); | 230 IDC_FULLSCREEN, IDR_FULLSCREEN_MENU_BUTTON); |
| 231 AddButtonItem(IDC_ZOOM_MENU, zoom_menu_item_model_.get()); | 231 AddButtonItem(IDC_ZOOM_MENU, zoom_menu_item_model_.get()); |
| 232 #else | 232 #else |
| 233 // TODO(port): Move to the above. | 233 // TODO(port): Move to the above. |
| 234 CreateZoomFullscreen(); | 234 CreateZoomFullscreen(); |
| 235 #endif | 235 #endif |
| 236 | 236 |
| 237 AddSeparator(); | 237 AddSeparator(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 return l10n_util::GetStringFUTF16( | 329 return l10n_util::GetStringFUTF16( |
| 330 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 330 IDS_ABOUT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 331 } | 331 } |
| 332 | 332 |
| 333 bool WrenchMenuModel::IsDynamicItem(int index) const { | 333 bool WrenchMenuModel::IsDynamicItem(int index) const { |
| 334 int command_id = GetCommandIdAt(index); | 334 int command_id = GetCommandIdAt(index); |
| 335 return command_id == IDC_SYNC_BOOKMARKS || | 335 return command_id == IDC_SYNC_BOOKMARKS || |
| 336 command_id == IDC_ABOUT; | 336 command_id == IDC_ABOUT; |
| 337 } | 337 } |
| OLD | NEW |