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

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

Issue 10836209: Don't show the exit command in the wrench menu when running in Metro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK); 541 AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK);
542 542
543 AddGlobalErrorMenuItems(); 543 AddGlobalErrorMenuItems();
544 544
545 if (is_touch_menu) { 545 if (is_touch_menu) {
546 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU, 546 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_MORE_TOOLS_MENU,
547 tools_menu_model_.get()); 547 tools_menu_model_.get());
548 } 548 }
549 549
550 if (browser_defaults::kShowExitMenuItem) { 550 if (browser_defaults::kShowExitMenuItem) {
551 AddSeparator(); 551 #if defined(OS_WIN)
552 AddItemWithStringId(IDC_EXIT, IDS_EXIT); 552 if (!base::win::IsMetroProcess())
553 #endif
554 {
555 AddSeparator();
556 AddItemWithStringId(IDC_EXIT, IDS_EXIT);
557 }
553 } 558 }
554 } 559 }
555 560
556 void WrenchMenuModel::AddGlobalErrorMenuItems() { 561 void WrenchMenuModel::AddGlobalErrorMenuItems() {
557 // TODO(sail): Currently we only build the wrench menu once per browser 562 // TODO(sail): Currently we only build the wrench menu once per browser
558 // window. This means that if a new error is added after the menu is built 563 // window. This means that if a new error is added after the menu is built
559 // it won't show in the existing wrench menu. To fix this we need to some 564 // it won't show in the existing wrench menu. To fix this we need to some
560 // how update the menu if new errors are added. 565 // how update the menu if new errors are added.
561 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 566 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
562 const GlobalErrorService::GlobalErrorList& errors = 567 const GlobalErrorService::GlobalErrorList& errors =
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 zoom_label_ = l10n_util::GetStringFUTF16( 647 zoom_label_ = l10n_util::GetStringFUTF16(
643 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 648 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
644 } 649 }
645 650
646 string16 WrenchMenuModel::GetSyncMenuLabel() const { 651 string16 WrenchMenuModel::GetSyncMenuLabel() const {
647 Profile* profile = browser_->profile()->GetOriginalProfile(); 652 Profile* profile = browser_->profile()->GetOriginalProfile();
648 return sync_ui_util::GetSyncMenuLabel( 653 return sync_ui_util::GetSyncMenuLabel(
649 ProfileSyncServiceFactory::GetForProfile(profile), 654 ProfileSyncServiceFactory::GetForProfile(profile),
650 *SigninManagerFactory::GetForProfile(profile)); 655 *SigninManagerFactory::GetForProfile(profile));
651 } 656 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698