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

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

Issue 9456031: Remove PSS::ShowLoginDialog() and obsolete IDC_SYNC_BOOKMARKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review feedback. Created 8 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 | Annotate | Revision Log
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 bool WrenchMenuModel::DoesCommandIdDismissMenu(int command_id) const { 224 bool WrenchMenuModel::DoesCommandIdDismissMenu(int command_id) const {
225 return command_id != IDC_ZOOM_MINUS && command_id != IDC_ZOOM_PLUS; 225 return command_id != IDC_ZOOM_MINUS && command_id != IDC_ZOOM_PLUS;
226 } 226 }
227 227
228 bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const { 228 bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const {
229 return command_id == IDC_ZOOM_PERCENT_DISPLAY || 229 return command_id == IDC_ZOOM_PERCENT_DISPLAY ||
230 #if defined(OS_MACOSX) 230 #if defined(OS_MACOSX)
231 command_id == IDC_FULLSCREEN || 231 command_id == IDC_FULLSCREEN ||
232 #endif 232 #endif
233 command_id == IDC_SYNC_BOOKMARKS ||
234 command_id == IDC_VIEW_BACKGROUND_PAGES || 233 command_id == IDC_VIEW_BACKGROUND_PAGES ||
235 command_id == IDC_UPGRADE_DIALOG || 234 command_id == IDC_UPGRADE_DIALOG ||
236 command_id == IDC_SHOW_SYNC_SETUP; 235 command_id == IDC_SHOW_SYNC_SETUP;
237 } 236 }
238 237
239 string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const { 238 string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
240 switch (command_id) { 239 switch (command_id) {
241 case IDC_SYNC_BOOKMARKS:
242 return GetSyncMenuLabel();
243 case IDC_ZOOM_PERCENT_DISPLAY: 240 case IDC_ZOOM_PERCENT_DISPLAY:
244 return zoom_label_; 241 return zoom_label_;
245 #if defined(OS_MACOSX) 242 #if defined(OS_MACOSX)
246 case IDC_FULLSCREEN: { 243 case IDC_FULLSCREEN: {
247 int string_id = IDS_ENTER_FULLSCREEN_MAC; // Default to Enter. 244 int string_id = IDS_ENTER_FULLSCREEN_MAC; // Default to Enter.
248 // Note: On startup, |window()| may be NULL. 245 // Note: On startup, |window()| may be NULL.
249 if (browser_->window() && browser_->window()->IsFullscreen()) 246 if (browser_->window() && browser_->window()->IsFullscreen())
250 string_id = IDS_EXIT_FULLSCREEN_MAC; 247 string_id = IDS_EXIT_FULLSCREEN_MAC;
251 return l10n_util::GetStringUTF16(string_id); 248 return l10n_util::GetStringUTF16(string_id);
252 } 249 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 &enable_increment, &enable_decrement); 570 &enable_increment, &enable_decrement);
574 } 571 }
575 zoom_label_ = l10n_util::GetStringFUTF16( 572 zoom_label_ = l10n_util::GetStringFUTF16(
576 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 573 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
577 } 574 }
578 575
579 string16 WrenchMenuModel::GetSyncMenuLabel() const { 576 string16 WrenchMenuModel::GetSyncMenuLabel() const {
580 return sync_ui_util::GetSyncMenuLabel(ProfileSyncServiceFactory:: 577 return sync_ui_util::GetSyncMenuLabel(ProfileSyncServiceFactory::
581 GetInstance()->GetForProfile(browser_->profile()->GetOriginalProfile())); 578 GetInstance()->GetForProfile(browser_->profile()->GetOriginalProfile()));
582 } 579 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.mm ('k') | chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698