| Index: ash/common/system/update/tray_update.h
|
| diff --git a/ash/common/system/update/tray_update.h b/ash/common/system/update/tray_update.h
|
| index 3850804bc888a2ba3efca6e12f41ecdae7475540..5cf23f7002701f4e9837b28117fe9aaf4a2c23b5 100644
|
| --- a/ash/common/system/update/tray_update.h
|
| +++ b/ash/common/system/update/tray_update.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "ash/ash_export.h"
|
| #include "ash/common/system/tray/tray_image_item.h"
|
| +#include "ash/common/system/update/update_observer.h"
|
| #include "base/macros.h"
|
|
|
| namespace views {
|
| @@ -15,37 +16,19 @@
|
|
|
| namespace ash {
|
|
|
| -namespace mojom {
|
| -enum class UpdateSeverity;
|
| -}
|
| -
|
| -// The system update tray item. The tray icon stays visible once an update
|
| -// notification is received. The icon only disappears after a reboot to apply
|
| -// the update. Exported for test.
|
| -class ASH_EXPORT TrayUpdate : public TrayImageItem {
|
| +// The system update tray item. Exported for test.
|
| +class ASH_EXPORT TrayUpdate : public TrayImageItem, public UpdateObserver {
|
| public:
|
| explicit TrayUpdate(SystemTray* system_tray);
|
| ~TrayUpdate() override;
|
|
|
| - // Shows an icon in the system tray indicating that a software update is
|
| - // available. Once shown the icon persists until reboot. |severity| and
|
| - // |factory_reset_required| are used to set the icon, color, and tooltip.
|
| - void ShowUpdateIcon(mojom::UpdateSeverity severity,
|
| - bool factory_reset_required);
|
| -
|
| private:
|
| - class UpdateView;
|
| -
|
| // Overridden from TrayImageItem.
|
| bool GetInitialVisibility() override;
|
| views::View* CreateDefaultView(LoginStatus status) override;
|
|
|
| - // If an external monitor is connected then the system tray may be created
|
| - // after the update data is sent from chrome, so share the update info between
|
| - // all instances.
|
| - static bool update_required_;
|
| - static mojom::UpdateSeverity severity_;
|
| - static bool factory_reset_required_;
|
| + // Overridden from UpdateObserver.
|
| + void OnUpdateRecommended(const UpdateInfo& info) override;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
|
| };
|
|
|