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

Side by Side Diff: ash/common/system/update/tray_update.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/system/update/tray_update.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_SYSTEM_UPDATE_TRAY_UPDATE_H_
6 #define ASH_COMMON_SYSTEM_UPDATE_TRAY_UPDATE_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/system/tray/tray_image_item.h"
10 #include "base/macros.h"
11
12 namespace views {
13 class View;
14 }
15
16 namespace ash {
17
18 namespace mojom {
19 enum class UpdateSeverity;
20 }
21
22 // The system update tray item. The tray icon stays visible once an update
23 // notification is received. The icon only disappears after a reboot to apply
24 // the update. Exported for test.
25 class ASH_EXPORT TrayUpdate : public TrayImageItem {
26 public:
27 explicit TrayUpdate(SystemTray* system_tray);
28 ~TrayUpdate() override;
29
30 // Shows an icon in the system tray indicating that a software update is
31 // available. Once shown the icon persists until reboot. |severity| and
32 // |factory_reset_required| are used to set the icon, color, and tooltip.
33 void ShowUpdateIcon(mojom::UpdateSeverity severity,
34 bool factory_reset_required);
35
36 private:
37 class UpdateView;
38
39 // Overridden from TrayImageItem.
40 bool GetInitialVisibility() override;
41 views::View* CreateDefaultView(LoginStatus status) override;
42
43 // If an external monitor is connected then the system tray may be created
44 // after the update data is sent from chrome, so share the update info between
45 // all instances.
46 static bool update_required_;
47 static mojom::UpdateSeverity severity_;
48 static bool factory_reset_required_;
49
50 DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
51 };
52
53 } // namespace ash
54
55 #endif // ASH_COMMON_SYSTEM_UPDATE_TRAY_UPDATE_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/system/update/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698