Windows should animate when they are about to get docked at screen edges.
[chromium-blink-merge.git] / ash / system / drive / tray_drive.h
blob6550fdeda8eece5bbf5b2ce095dc99ea7a238aca
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.
5 #ifndef ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
6 #define ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
8 #include "ash/system/drive/drive_observer.h"
9 #include "ash/system/tray/tray_image_item.h"
10 #include "base/timer/timer.h"
12 namespace views {
13 class Label;
16 namespace ash {
17 namespace internal {
19 namespace tray {
20 class DriveTrayView;
21 class DriveDefaultView;
22 class DriveDetailedView;
25 class TrayDrive : public TrayImageItem,
26 public DriveObserver {
27 public:
28 explicit TrayDrive(SystemTray* system_tray);
29 virtual ~TrayDrive();
31 private:
32 // Overridden from TrayImageItem.
33 virtual bool GetInitialVisibility() OVERRIDE;
35 // Overridden from SystemTrayItem.
36 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
37 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
38 virtual void DestroyDefaultView() OVERRIDE;
39 virtual void DestroyDetailedView() OVERRIDE;
40 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
42 // Overridden from DriveObserver.
43 virtual void OnDriveJobUpdated(const DriveOperationStatus& status) OVERRIDE;
45 // Delayed hiding of the tray item after encountering an empty operation list.
46 void HideIfNoOperations();
48 tray::DriveDefaultView* default_;
49 tray::DriveDetailedView* detailed_;
50 base::OneShotTimer<TrayDrive> hide_timer_;
52 DISALLOW_COPY_AND_ASSIGN(TrayDrive);
55 } // namespace internal
56 } // namespace ash
58 #endif // ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_