| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | 5 #ifndef ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H |
| 6 #define ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | 6 #define ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H |
| 7 | 7 |
| 8 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" | |
| 9 #include "ash/system/tray/system_tray_item.h" | 8 #include "ash/system/tray/system_tray_item.h" |
| 10 #include "ash/system/tray/view_click_listener.h" | 9 #include "ash/system/tray/view_click_listener.h" |
| 11 | 10 |
| 12 namespace ash { | 11 namespace ash { |
| 13 class SystemTray; | 12 class SystemTray; |
| 14 } | 13 } |
| 15 | 14 |
| 16 namespace ash { | 15 namespace ash { |
| 17 namespace internal { | 16 namespace internal { |
| 18 | 17 |
| 19 class EnterpriseDefaultView; | 18 class LocallyManagedUserDefaultView; |
| 20 | 19 |
| 21 class TrayEnterprise : public SystemTrayItem, | 20 class TrayLocallyManagedUser : public SystemTrayItem, |
| 22 public ViewClickListener, | 21 public ViewClickListener { |
| 23 public EnterpriseDomainObserver { | |
| 24 public: | 22 public: |
| 25 explicit TrayEnterprise(SystemTray* system_tray); | 23 explicit TrayLocallyManagedUser(SystemTray* system_tray); |
| 26 virtual ~TrayEnterprise(); | 24 virtual ~TrayLocallyManagedUser(); |
| 27 | 25 |
| 28 // If message is not empty updates content of default view, otherwise hides | 26 // If message is not empty updates content of default view, otherwise hides |
| 29 // tray items. | 27 // tray items. |
| 30 void UpdateEnterpriseMessage(); | 28 void UpdateMessage(); |
| 31 | 29 |
| 32 // Overridden from SystemTrayItem. | 30 // Overridden from SystemTrayItem. |
| 33 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 31 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
| 34 virtual void DestroyDefaultView() OVERRIDE; | 32 virtual void DestroyDefaultView() OVERRIDE; |
| 35 | 33 |
| 36 // Overridden from EnterpriseDomainObserver. | |
| 37 virtual void OnEnterpriseDomainChanged() OVERRIDE; | |
| 38 | |
| 39 // Overridden from ViewClickListener. | 34 // Overridden from ViewClickListener. |
| 40 virtual void OnViewClicked(views::View* sender) OVERRIDE; | 35 virtual void OnViewClicked(views::View* sender) OVERRIDE; |
| 41 | 36 |
| 42 private: | 37 private: |
| 43 EnterpriseDefaultView* default_view_; | 38 LocallyManagedUserDefaultView* default_view_; |
| 44 | 39 |
| 45 DISALLOW_COPY_AND_ASSIGN(TrayEnterprise); | 40 DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUser); |
| 46 }; | 41 }; |
| 47 | 42 |
| 48 } // namespace internal | 43 } // namespace internal |
| 49 } // namespace ash | 44 } // namespace ash |
| 50 | 45 |
| 51 #endif // ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H | 46 #endif // ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H |
| 52 | 47 |
| OLD | NEW |