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

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

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX) 169 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX)
170 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS); 170 AddItemWithStringId(IDC_CREATE_SHORTCUTS, IDS_CREATE_SHORTCUTS);
171 AddSeparator(); 171 AddSeparator();
172 #endif 172 #endif
173 173
174 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS); 174 AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
175 175
176 #if defined(OS_WIN) 176 #if defined(OS_WIN)
177 // In metro we can't display the task manager for now 177 // In metro we can't display the task manager for now
178 // as it's a native window, so don't display the menu item. 178 // as it's a native window, so don't display the menu item.
179 if (!base::win::GetMetroModule()) 179 if (!base::win::InMetroMode())
180 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 180 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
181 #else 181 #else
182 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 182 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
183 #endif 183 #endif
184 184
185 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA); 185 AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA);
186 186
187 AddSeparator(); 187 AddSeparator();
188 188
189 #if !defined(OS_CHROMEOS) 189 #if !defined(OS_CHROMEOS)
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 zoom_label_ = l10n_util::GetStringFUTF16( 623 zoom_label_ = l10n_util::GetStringFUTF16(
624 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 624 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
625 } 625 }
626 626
627 string16 WrenchMenuModel::GetSyncMenuLabel() const { 627 string16 WrenchMenuModel::GetSyncMenuLabel() const {
628 Profile* profile = browser_->profile()->GetOriginalProfile(); 628 Profile* profile = browser_->profile()->GetOriginalProfile();
629 return sync_ui_util::GetSyncMenuLabel( 629 return sync_ui_util::GetSyncMenuLabel(
630 ProfileSyncServiceFactory::GetForProfile(profile), 630 ProfileSyncServiceFactory::GetForProfile(profile),
631 *SigninManagerFactory::GetForProfile(profile)); 631 *SigninManagerFactory::GetForProfile(profile));
632 } 632 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698