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_DRIVE_TRAY_DRIVE_H_ | |
6 #define ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_ | |
7 #pragma once | |
8 | |
9 #include "ash/system/drive/drive_observer.h" | |
10 #include "ash/system/tray/tray_image_item.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 | |
13 | |
xiyuan
2012/05/01 16:47:53
nit: nuke one empty line
| |
14 namespace views { | |
15 class Label; | |
16 } | |
17 | |
18 namespace ash { | |
19 | |
20 namespace internal { | |
21 | |
22 namespace tray { | |
23 class DriveTrayView; | |
24 class DriveDefaultView; | |
25 class DriveDetailedView; | |
26 }; | |
sadrul
2012/05/01 14:28:58
I think we avoid ;s after namespace
zel
2012/05/01 16:56:52
Done.
| |
27 | |
28 class TrayItemView; | |
sadrul
2012/05/01 14:28:58
- this
zel
2012/05/01 16:56:52
Removed.
| |
29 | |
30 class TrayDrive : public TrayImageItem, | |
31 public DriveObserver { | |
32 public: | |
33 TrayDrive(); | |
34 virtual ~TrayDrive(); | |
35 | |
36 private: | |
37 // Overridden from TrayImageItem. | |
38 virtual bool GetInitialVisibility() OVERRIDE; | |
39 | |
40 // Overridden from SystemTrayItem. | |
41 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | |
42 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | |
43 virtual void DestroyDefaultView() OVERRIDE; | |
44 virtual void DestroyDetailedView() OVERRIDE; | |
45 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | |
46 | |
47 // Overridden from DriveObserver. | |
48 virtual void OnDriveRefresh(const DriveOperationStatusList& list) OVERRIDE; | |
49 | |
50 // Delayed re-check of the status after encounter operation depleted list. | |
51 void OnStatusCheck(); | |
52 | |
53 void UpdateTrayIcon(bool show); | |
54 | |
55 scoped_ptr<tray::DriveDefaultView> default_; | |
56 scoped_ptr<tray::DriveDetailedView> detailed_; | |
sadrul
2012/05/01 14:28:58
stevenjb@ has a CL (http://codereview.chromium.org
zel
2012/05/01 16:56:52
Done.
zel
2012/05/01 16:56:52
Yes, good point. Done.
| |
57 | |
58 DISALLOW_COPY_AND_ASSIGN(TrayDrive); | |
59 }; | |
60 | |
61 } // namespace internal | |
62 } // namespace ash | |
63 | |
64 #endif // ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_ | |
OLD | NEW |