Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: ash/system/update/tray_update.h

Issue 2816253002: Display "Restart to update Adobe Flash Player" for Flash updates. (Closed)
Patch Set: Fix nits from last review Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray_controller.cc ('k') | ash/system/update/tray_update.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/update/tray_update.h
diff --git a/ash/system/update/tray_update.h b/ash/system/update/tray_update.h
index 70c970e2f69ccae348780fa122aa08ab30820cd6..6d3a9c001ed08bafebe8d7d6e15af165e262e8c6 100644
--- a/ash/system/update/tray_update.h
+++ b/ash/system/update/tray_update.h
@@ -7,9 +7,12 @@
#include "ash/ash_export.h"
#include "ash/system/tray/tray_image_item.h"
+#include "base/gtest_prod_util.h"
#include "base/macros.h"
+#include "base/strings/string16.h"
namespace views {
+class Label;
class View;
}
@@ -17,6 +20,7 @@ namespace ash {
namespace mojom {
enum class UpdateSeverity;
+enum class UpdateType;
}
// The system update tray item. The tray icon stays visible once an update
@@ -31,14 +35,23 @@ class ASH_EXPORT TrayUpdate : public TrayImageItem {
// 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);
+ bool factory_reset_required,
+ mojom::UpdateType update_type);
private:
+ FRIEND_TEST_ALL_PREFIXES(TrayUpdateTest, VisibilityAfterUpdate);
+ FRIEND_TEST_ALL_PREFIXES(TrayUpdateTest, VisibilityAfterFlashUpdate);
+
class UpdateView;
// Overridden from TrayImageItem.
bool GetInitialVisibility() override;
views::View* CreateDefaultView(LoginStatus status) override;
+ void DestroyDefaultView() override;
+
+ // Expose label information for testing.
+ views::Label* GetLabelForTesting();
+ UpdateView* update_view_;
// 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
@@ -46,6 +59,7 @@ class ASH_EXPORT TrayUpdate : public TrayImageItem {
static bool update_required_;
static mojom::UpdateSeverity severity_;
static bool factory_reset_required_;
+ static mojom::UpdateType update_type_;
DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
};
« no previous file with comments | « ash/system/tray/system_tray_controller.cc ('k') | ash/system/update/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698