| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ash/system_tray_delegate_common.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_common.h" |
| 6 | 6 |
| 7 #include "ash/networking_config_delegate.h" | 7 #include "ash/networking_config_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 GetUpdateInfo(UpgradeDetector::GetInstance(), info); | 74 GetUpdateInfo(UpgradeDetector::GetInstance(), info); |
| 75 } | 75 } |
| 76 | 76 |
| 77 base::HourClockType SystemTrayDelegateCommon::GetHourClockType() const { | 77 base::HourClockType SystemTrayDelegateCommon::GetHourClockType() const { |
| 78 return clock_type_; | 78 return clock_type_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void SystemTrayDelegateCommon::ShowChromeSlow() { | 81 void SystemTrayDelegateCommon::ShowChromeSlow() { |
| 82 #if defined(OS_LINUX) | 82 #if defined(OS_LINUX) |
| 83 chrome::ScopedTabbedBrowserDisplayer displayer( | 83 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 84 ProfileManager::GetPrimaryUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); | 84 ProfileManager::GetPrimaryUserProfile(), ui::HOST_DESKTOP_TYPE_ASH); |
| 85 chrome::ShowSlow(displayer.browser()); | 85 chrome::ShowSlow(displayer.browser()); |
| 86 #endif // defined(OS_LINUX) | 86 #endif // defined(OS_LINUX) |
| 87 } | 87 } |
| 88 | 88 |
| 89 void SystemTrayDelegateCommon::ShowHelp() { | 89 void SystemTrayDelegateCommon::ShowHelp() { |
| 90 chrome::ShowHelpForProfile(ProfileManager::GetLastUsedProfile(), | 90 chrome::ShowHelpForProfile(ProfileManager::GetLastUsedProfile(), |
| 91 chrome::HOST_DESKTOP_TYPE_ASH, | 91 ui::HOST_DESKTOP_TYPE_ASH, |
| 92 chrome::HELP_SOURCE_MENU); | 92 chrome::HELP_SOURCE_MENU); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void SystemTrayDelegateCommon::RequestRestartForUpdate() { | 95 void SystemTrayDelegateCommon::RequestRestartForUpdate() { |
| 96 chrome::AttemptRestart(); | 96 chrome::AttemptRestart(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 int SystemTrayDelegateCommon::GetSystemTrayMenuWidth() { | 99 int SystemTrayDelegateCommon::GetSystemTrayMenuWidth() { |
| 100 return l10n_util::GetLocalizedContentsWidthInPixels( | 100 return l10n_util::GetLocalizedContentsWidthInPixels( |
| 101 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS); | 101 IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 113 const content::NotificationSource& source, | 113 const content::NotificationSource& source, |
| 114 const content::NotificationDetails& details) { | 114 const content::NotificationDetails& details) { |
| 115 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { | 115 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { |
| 116 ash::UpdateInfo info; | 116 ash::UpdateInfo info; |
| 117 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); | 117 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); |
| 118 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); | 118 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); |
| 119 } else { | 119 } else { |
| 120 NOTREACHED(); | 120 NOTREACHED(); |
| 121 } | 121 } |
| 122 } | 122 } |
| OLD | NEW |