| 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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) || | 936 content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) || |
| 937 (base::win::GetVersion() >= base::win::VERSION_WIN8)) { | 937 (base::win::GetVersion() >= base::win::VERSION_WIN8)) { |
| 938 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) { | 938 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) { |
| 939 // ASH/Metro mode, add the 'Relaunch Chrome in desktop mode'. | 939 // ASH/Metro mode, add the 'Relaunch Chrome in desktop mode'. |
| 940 AddSeparator(ui::NORMAL_SEPARATOR); | 940 AddSeparator(ui::NORMAL_SEPARATOR); |
| 941 AddItemWithStringId(IDC_WIN_DESKTOP_RESTART, IDS_WIN_DESKTOP_RESTART); | 941 AddItemWithStringId(IDC_WIN_DESKTOP_RESTART, IDS_WIN_DESKTOP_RESTART); |
| 942 } else { | 942 } else { |
| 943 // In Windows 8 desktop, add the 'Relaunch Chrome in Windows 8 mode'. | 943 // In Windows 8 desktop, add the 'Relaunch Chrome in Windows 8 mode'. |
| 944 // In Windows 7 desktop, add the 'Relaunch Chrome in Windows ASH mode' | 944 // In Windows 7 desktop, add the 'Relaunch Chrome in Windows ASH mode' |
| 945 AddSeparator(ui::NORMAL_SEPARATOR); | 945 AddSeparator(ui::NORMAL_SEPARATOR); |
| 946 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | 946 if (base::win::GetVersion() == base::win::VERSION_WIN8 || |
| 947 base::win::GetVersion() == base::win::VERSION_WIN8_1) |
| 947 AddItemWithStringId(IDC_WIN8_METRO_RESTART, IDS_WIN8_METRO_RESTART); | 948 AddItemWithStringId(IDC_WIN8_METRO_RESTART, IDS_WIN8_METRO_RESTART); |
| 948 else | 949 else |
| 949 AddItemWithStringId(IDC_WIN_CHROMEOS_RESTART, IDS_WIN_CHROMEOS_RESTART); | 950 AddItemWithStringId(IDC_WIN_CHROMEOS_RESTART, IDS_WIN_CHROMEOS_RESTART); |
| 950 } | 951 } |
| 951 } | 952 } |
| 952 #endif | 953 #endif |
| 953 | 954 |
| 954 bool show_exit_menu = browser_defaults::kShowExitMenuItem; | 955 bool show_exit_menu = browser_defaults::kShowExitMenuItem; |
| 955 #if defined(OS_WIN) | 956 #if defined(OS_WIN) |
| 956 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) | 957 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 ->GetZoomPercent(); | 1063 ->GetZoomPercent(); |
| 1063 } | 1064 } |
| 1064 zoom_label_ = l10n_util::GetStringFUTF16( | 1065 zoom_label_ = l10n_util::GetStringFUTF16( |
| 1065 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 1066 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 1066 } | 1067 } |
| 1067 | 1068 |
| 1068 void WrenchMenuModel::OnZoomLevelChanged( | 1069 void WrenchMenuModel::OnZoomLevelChanged( |
| 1069 const content::HostZoomMap::ZoomLevelChange& change) { | 1070 const content::HostZoomMap::ZoomLevelChange& change) { |
| 1070 UpdateZoomControls(); | 1071 UpdateZoomControls(); |
| 1071 } | 1072 } |
| OLD | NEW |