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_DATE_TRAY_MONITOR_H_ 6 #define ASH_SYSTEM_DATE_TRAY_MONITOR_H_ 7 8 #include <list> 9 10 #include "ash/system/tray/system_tray_item.h" 11 #include "base/process/process.h" 12 #include "base/timer/timer.h" 13 14 namespace views { 15 class Label; 16 } 17 18 namespace ash { 19 namespace internal { 20 21 class TrayMonitor : public SystemTrayItem { 22 public: 23 explicit TrayMonitor(SystemTray* system_tray); 24 virtual ~TrayMonitor(); 25 26 private: 27 // Overridden from SystemTrayItem. 28 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; 29 virtual void DestroyTrayView() OVERRIDE; 30 31 void OnTimer(); 32 void OnGotHandles(const std::list<base::ProcessHandle>& handles); 33 34 views::Label* label_; 35 base::RepeatingTimer<TrayMonitor> refresh_timer_; 36 37 DISALLOW_COPY_AND_ASSIGN(TrayMonitor); 38 }; 39 40 } // namespace internal 41 } // namespace ash 42 43 #endif // ASH_SYSTEM_DATE_TRAY_MONITOR_H_ 44