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

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

Issue 12330056: Remove the Exit menu item from the Wrench menu in Win/Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update accelerator unit test. Created 7 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (browser_defaults::kShowFeedbackMenuItem) 606 if (browser_defaults::kShowFeedbackMenuItem)
607 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK); 607 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK);
608 608
609 AddGlobalErrorMenuItems(); 609 AddGlobalErrorMenuItems();
610 610
611 if (is_new_menu) { 611 if (is_new_menu) {
612 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU, 612 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU,
613 tools_menu_model_.get()); 613 tools_menu_model_.get());
614 } 614 }
615 615
616 if (browser_defaults::kShowExitMenuItem) { 616 bool show_exit_menu = browser_defaults::kShowExitMenuItem;
617 #if defined(OS_WIN) && defined(USE_AURA)
618 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
619 show_exit_menu = false;
620 #endif
621 if (show_exit_menu) {
617 AddSeparator(ui::NORMAL_SEPARATOR); 622 AddSeparator(ui::NORMAL_SEPARATOR);
618 AddItemWithStringId(IDC_EXIT, IDS_EXIT); 623 AddItemWithStringId(IDC_EXIT, IDS_EXIT);
619 } 624 }
620 625
621 if (is_new_menu && supports_new_separators) 626 if (is_new_menu && supports_new_separators)
622 AddSeparator(ui::SPACING_SEPARATOR); 627 AddSeparator(ui::SPACING_SEPARATOR);
623 } 628 }
624 629
625 void WrenchMenuModel::AddGlobalErrorMenuItems() { 630 void WrenchMenuModel::AddGlobalErrorMenuItems() {
626 // TODO(sail): Currently we only build the wrench menu once per browser 631 // TODO(sail): Currently we only build the wrench menu once per browser
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent( 714 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent(
710 &enable_increment, &enable_decrement); 715 &enable_increment, &enable_decrement);
711 } 716 }
712 zoom_label_ = l10n_util::GetStringFUTF16( 717 zoom_label_ = l10n_util::GetStringFUTF16(
713 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 718 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
714 } 719 }
715 720
716 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) { 721 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) {
717 UpdateZoomControls(); 722 UpdateZoomControls();
718 } 723 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698