| OLD | NEW |
| (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_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | |
| 6 #define ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | |
| 7 | |
| 8 #include "ash/common/system/chromeos/enterprise/enterprise_domain_observer.h" | |
| 9 #include "ash/common/system/tray/system_tray_item.h" | |
| 10 #include "ash/common/system/tray/view_click_listener.h" | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 namespace views { | |
| 14 class View; | |
| 15 } | |
| 16 | |
| 17 namespace ash { | |
| 18 class LabelTrayView; | |
| 19 class SystemTray; | |
| 20 | |
| 21 class TrayEnterprise : public SystemTrayItem, | |
| 22 public ViewClickListener, | |
| 23 public EnterpriseDomainObserver { | |
| 24 public: | |
| 25 explicit TrayEnterprise(SystemTray* system_tray); | |
| 26 ~TrayEnterprise() override; | |
| 27 | |
| 28 // If message is not empty updates content of default view, otherwise hides | |
| 29 // tray items. | |
| 30 void UpdateEnterpriseMessage(); | |
| 31 | |
| 32 // Overridden from SystemTrayItem. | |
| 33 views::View* CreateDefaultView(LoginStatus status) override; | |
| 34 void DestroyDefaultView() override; | |
| 35 | |
| 36 // Overridden from EnterpriseDomainObserver. | |
| 37 void OnEnterpriseDomainChanged() override; | |
| 38 | |
| 39 // Overridden from ViewClickListener. | |
| 40 void OnViewClicked(views::View* sender) override; | |
| 41 | |
| 42 private: | |
| 43 LabelTrayView* tray_view_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(TrayEnterprise); | |
| 46 }; | |
| 47 | |
| 48 } // namespace ash | |
| 49 | |
| 50 #endif // ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | |
| OLD | NEW |