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