Index: chrome/browser/ui/ash/system_tray_delegate_linux.cc |
diff --git a/chrome/browser/ui/ash/system_tray_delegate_win.cc b/chrome/browser/ui/ash/system_tray_delegate_linux.cc |
similarity index 91% |
copy from chrome/browser/ui/ash/system_tray_delegate_win.cc |
copy to chrome/browser/ui/ash/system_tray_delegate_linux.cc |
index 9b15bbe9683e14b80258becde38d0cfaa98886a7..c30d1a0679d0da51226100ad268a662883400a6e 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_win.cc |
+++ b/chrome/browser/ui/ash/system_tray_delegate_linux.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/ui/ash/system_tray_delegate_win.h" |
+#include "chrome/browser/ui/ash/system_tray_delegate_linux.h" |
#include <string> |
@@ -19,19 +19,19 @@ |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/chrome_pages.h" |
#include "chrome/browser/ui/host_desktop.h" |
+#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
#include "chrome/browser/upgrade_detector.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_service.h" |
- |
#include "grit/locale_settings.h" |
#include "ui/base/l10n/l10n_util.h" |
namespace { |
-class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
- public content::NotificationObserver { |
+class SystemTrayDelegateLinux : public ash::SystemTrayDelegate, |
+ public content::NotificationObserver { |
public: |
- SystemTrayDelegateWin() |
+ SystemTrayDelegateLinux() |
: clock_type_(base::GetHourClockType()) { |
// Register notifications on construction so that events such as |
// PROFILE_CREATED do not get missed if they happen before Initialize(). |
@@ -41,7 +41,7 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
content::NotificationService::AllSources()); |
} |
- virtual ~SystemTrayDelegateWin() { |
+ virtual ~SystemTrayDelegateLinux() { |
registrar_.reset(); |
} |
@@ -116,6 +116,9 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
} |
virtual void ShowChromeSlow() OVERRIDE { |
+ chrome::ScopedTabbedBrowserDisplayer displayer( |
+ ProfileManager::GetPrimaryUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); |
+ chrome::ShowSlow(displayer.browser()); |
} |
virtual bool ShouldShowDisplayNotification() OVERRIDE { |
@@ -319,6 +322,7 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
ash::UpdateObserver::UpdateSeverity severity = |
ash::UpdateObserver::UPDATE_NORMAL; |
switch (detector->upgrade_notification_stage()) { |
+ case UpgradeDetector::UPGRADE_ANNOYANCE_CRITICAL: |
James Cook
2014/05/29 21:49:11
I love that we have an UPGRADE_ANNOYANCE enum.
|
case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE: |
severity = ash::UpdateObserver::UPDATE_SEVERE_RED; |
break; |
@@ -329,6 +333,7 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
severity = ash::UpdateObserver::UPDATE_LOW_GREEN; |
break; |
case UpgradeDetector::UPGRADE_ANNOYANCE_LOW: |
+ case UpgradeDetector::UPGRADE_ANNOYANCE_NONE: |
James Cook
2014/05/29 21:49:11
Does the Windows version need these changes?
Elliot Glaysher
2014/05/30 19:43:17
Done.
|
severity = ash::UpdateObserver::UPDATE_NORMAL; |
break; |
} |
@@ -341,12 +346,12 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate, |
scoped_ptr<content::NotificationRegistrar> registrar_; |
base::HourClockType clock_type_; |
- DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateWin); |
+ DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateLinux); |
}; |
} // namespace |
-ash::SystemTrayDelegate* CreateWindowsSystemTrayDelegate() { |
- return new SystemTrayDelegateWin(); |
+ash::SystemTrayDelegate* CreateLinuxSystemTrayDelegate() { |
+ return new SystemTrayDelegateLinux(); |
} |