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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 string_id = IDS_EXIT_FULLSCREEN_MAC; | 264 string_id = IDS_EXIT_FULLSCREEN_MAC; |
265 return l10n_util::GetStringUTF16(string_id); | 265 return l10n_util::GetStringUTF16(string_id); |
266 } | 266 } |
267 #elif defined(OS_WIN) | 267 #elif defined(OS_WIN) |
268 case IDC_PIN_TO_START_SCREEN: { | 268 case IDC_PIN_TO_START_SCREEN: { |
269 int string_id = IDS_PIN_TO_START_SCREEN; | 269 int string_id = IDS_PIN_TO_START_SCREEN; |
270 WebContents* web_contents = chrome::GetActiveWebContents(browser_); | 270 WebContents* web_contents = chrome::GetActiveWebContents(browser_); |
271 MetroPinTabHelper* tab_helper = | 271 MetroPinTabHelper* tab_helper = |
272 web_contents ? MetroPinTabHelper::FromWebContents(web_contents) | 272 web_contents ? MetroPinTabHelper::FromWebContents(web_contents) |
273 : NULL; | 273 : NULL; |
274 if (tab_helper && tab_helper->is_pinned()) | 274 if (tab_helper && tab_helper->IsPinned()) |
275 string_id = IDS_UNPIN_FROM_START_SCREEN; | 275 string_id = IDS_UNPIN_FROM_START_SCREEN; |
276 return l10n_util::GetStringUTF16(string_id); | 276 return l10n_util::GetStringUTF16(string_id); |
277 } | 277 } |
278 #endif | 278 #endif |
279 case IDC_VIEW_BACKGROUND_PAGES: { | 279 case IDC_VIEW_BACKGROUND_PAGES: { |
280 string16 num_background_pages = base::FormatNumber( | 280 string16 num_background_pages = base::FormatNumber( |
281 TaskManager::GetBackgroundPageCount()); | 281 TaskManager::GetBackgroundPageCount()); |
282 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES, | 282 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES, |
283 num_background_pages); | 283 num_background_pages); |
284 } | 284 } |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 zoom_label_ = l10n_util::GetStringFUTF16( | 718 zoom_label_ = l10n_util::GetStringFUTF16( |
719 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 719 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
720 } | 720 } |
721 | 721 |
722 string16 WrenchMenuModel::GetSyncMenuLabel() const { | 722 string16 WrenchMenuModel::GetSyncMenuLabel() const { |
723 Profile* profile = browser_->profile()->GetOriginalProfile(); | 723 Profile* profile = browser_->profile()->GetOriginalProfile(); |
724 return sync_ui_util::GetSyncMenuLabel( | 724 return sync_ui_util::GetSyncMenuLabel( |
725 ProfileSyncServiceFactory::GetForProfile(profile), | 725 ProfileSyncServiceFactory::GetForProfile(profile), |
726 *SigninManagerFactory::GetForProfile(profile)); | 726 *SigninManagerFactory::GetForProfile(profile)); |
727 } | 727 } |
OLD | NEW |