replace OVERRIDE and FINAL with override and final in ash/
[chromium-blink-merge.git] / ash / system / chromeos / supervised / tray_supervised_user.h
blobf19b752419d3ada0c549bfcb188c7f02ee031dd4
1 // Copyright 2014 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.
5 #ifndef ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
6 #define ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
8 #include "ash/ash_export.h"
9 #include "ash/system/tray/system_tray_item.h"
10 #include "ash/system/tray/view_click_listener.h"
11 #include "base/strings/string16.h"
13 namespace ash {
14 class LabelTrayView;
15 class SystemTray;
17 class ASH_EXPORT TraySupervisedUser : public SystemTrayItem,
18 public ViewClickListener {
19 public:
20 explicit TraySupervisedUser(SystemTray* system_tray);
21 virtual ~TraySupervisedUser();
23 // If message is not empty updates content of default view, otherwise hides
24 // tray items.
25 void UpdateMessage();
27 // Overridden from SystemTrayItem.
28 virtual views::View* CreateDefaultView(user::LoginStatus status) override;
29 virtual void DestroyDefaultView() override;
30 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) override;
32 // Overridden from ViewClickListener.
33 virtual void OnViewClicked(views::View* sender) override;
35 private:
36 friend class TraySupervisedUserTest;
38 static const char kNotificationId[];
40 void CreateOrUpdateNotification(const base::string16& new_message);
42 LabelTrayView* tray_view_;
43 // Previous login status to avoid showing notification upon unlock.
44 user::LoginStatus status_;
46 // Previous user supervised state to avoid showing notification upon unlock.
47 bool is_user_supervised_;
49 DISALLOW_COPY_AND_ASSIGN(TraySupervisedUser);
52 } // namespace ash
54 #endif // ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H