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

Side by Side Diff: ash/common/system/date/tray_system_info.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/date/tray_date.cc ('k') | ash/common/system/date/tray_system_info.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 2016 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_DATE_TRAY_SYSTEM_INFO_H_
6 #define ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "ash/common/login_status.h"
12 #include "ash/common/system/date/clock_observer.h"
13 #include "ash/common/system/tray/system_tray_item.h"
14 #include "base/macros.h"
15
16 namespace views {
17 class Label;
18 }
19
20 namespace ash {
21 class SystemClockObserver;
22 class SystemInfoDefaultView;
23
24 namespace tray {
25 class TimeView;
26 }
27
28 // The bottom row of the system menu. The default view shows the current date
29 // and power status. The tray view shows the current time.
30 class ASH_EXPORT TraySystemInfo : public SystemTrayItem, public ClockObserver {
31 public:
32 explicit TraySystemInfo(SystemTray* system_tray);
33 ~TraySystemInfo() override;
34
35 const tray::TimeView* GetTimeTrayForTesting() const;
36 const SystemInfoDefaultView* GetDefaultViewForTesting() const;
37 views::View* CreateDefaultViewForTesting(LoginStatus status);
38
39 private:
40 // SystemTrayItem:
41 views::View* CreateTrayView(LoginStatus status) override;
42 views::View* CreateDefaultView(LoginStatus status) override;
43 void DestroyTrayView() override;
44 void DestroyDefaultView() override;
45 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
46
47 // ClockObserver:
48 void OnDateFormatChanged() override;
49 void OnSystemClockTimeUpdated() override;
50 void OnSystemClockCanSetTimeChanged(bool can_set_time) override;
51 void Refresh() override;
52
53 void SetupLabelForTimeTray(views::Label* label);
54 void UpdateTimeFormat();
55
56 tray::TimeView* tray_view_;
57 SystemInfoDefaultView* default_view_;
58 LoginStatus login_status_;
59
60 std::unique_ptr<SystemClockObserver> system_clock_observer_;
61
62 DISALLOW_COPY_AND_ASSIGN(TraySystemInfo);
63 };
64
65 } // namespace ash
66
67 #endif // ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_
OLDNEW
« no previous file with comments | « ash/common/system/date/tray_date.cc ('k') | ash/common/system/date/tray_system_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698