| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) |
| 253 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 253 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
| 254 | 254 |
| 255 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); | 255 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); |
| 256 | 256 |
| 257 #if defined(OS_CHROMEOS) |
| 258 AddItemWithStringId(IDC_TAKE_SCREENSHOT, IDS_TAKE_SCREENSHOT); |
| 259 #endif |
| 260 |
| 257 AddSeparator(ui::NORMAL_SEPARATOR); | 261 AddSeparator(ui::NORMAL_SEPARATOR); |
| 258 | 262 |
| 259 encoding_menu_model_.reset(new EncodingMenuModel(browser)); | 263 encoding_menu_model_.reset(new EncodingMenuModel(browser)); |
| 260 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU, | 264 AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU, |
| 261 encoding_menu_model_.get()); | 265 encoding_menu_model_.get()); |
| 262 AddItemWithStringId(IDC_VIEW_SOURCE, IDS_VIEW_SOURCE); | 266 AddItemWithStringId(IDC_VIEW_SOURCE, IDS_VIEW_SOURCE); |
| 263 AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS); | 267 AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS); |
| 264 AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE); | 268 AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE); |
| 265 AddItemWithStringId(IDC_DEV_TOOLS_DEVICES, IDS_DEV_TOOLS_DEVICES); | 269 AddItemWithStringId(IDC_DEV_TOOLS_DEVICES, IDS_DEV_TOOLS_DEVICES); |
| 266 | 270 |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 ->GetZoomPercent(); | 1073 ->GetZoomPercent(); |
| 1070 } | 1074 } |
| 1071 zoom_label_ = l10n_util::GetStringFUTF16( | 1075 zoom_label_ = l10n_util::GetStringFUTF16( |
| 1072 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 1076 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 1073 } | 1077 } |
| 1074 | 1078 |
| 1075 void WrenchMenuModel::OnZoomLevelChanged( | 1079 void WrenchMenuModel::OnZoomLevelChanged( |
| 1076 const content::HostZoomMap::ZoomLevelChange& change) { | 1080 const content::HostZoomMap::ZoomLevelChange& change) { |
| 1077 UpdateZoomControls(); | 1081 UpdateZoomControls(); |
| 1078 } | 1082 } |
| OLD | NEW |