Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: ash/system/tray_update.h

Issue 10291004: ash: Show a nagging reminder for available updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/tray_update.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TRAY_UPDATE_H_ 5 #ifndef ASH_SYSTEM_TRAY_UPDATE_H_
6 #define ASH_SYSTEM_TRAY_UPDATE_H_ 6 #define ASH_SYSTEM_TRAY_UPDATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/system/tray/tray_image_item.h" 9 #include "ash/system/tray/tray_image_item.h"
10 #include "base/memory/scoped_ptr.h"
10 11
11 namespace views { 12 namespace views {
12 class View; 13 class View;
13 } 14 }
14 15
15 namespace ash { 16 namespace ash {
16 17
17 class ASH_EXPORT UpdateObserver { 18 class ASH_EXPORT UpdateObserver {
18 public: 19 public:
19 virtual ~UpdateObserver() {} 20 virtual ~UpdateObserver() {}
20 21
21 virtual void OnUpdateRecommended() = 0; 22 virtual void OnUpdateRecommended() = 0;
22 }; 23 };
23 24
24 namespace internal { 25 namespace internal {
25 26
27 namespace tray {
28 class UpdateNagger;
29 }
30
26 class TrayUpdate : public TrayImageItem, 31 class TrayUpdate : public TrayImageItem,
27 public UpdateObserver { 32 public UpdateObserver {
28 public: 33 public:
29 TrayUpdate(); 34 TrayUpdate();
30 virtual ~TrayUpdate(); 35 virtual ~TrayUpdate();
31 36
32 private: 37 private:
33 // Overridden from TrayImageItem. 38 // Overridden from TrayImageItem.
34 virtual bool GetInitialVisibility() OVERRIDE; 39 virtual bool GetInitialVisibility() OVERRIDE;
35 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 40 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
36 virtual void DestroyDefaultView() OVERRIDE; 41 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
42 virtual void DestroyDetailedView() OVERRIDE;
37 43
38 // Overridden from UpdateObserver. 44 // Overridden from UpdateObserver.
39 virtual void OnUpdateRecommended() OVERRIDE; 45 virtual void OnUpdateRecommended() OVERRIDE;
40 46
47 // Used to nag the user in case the tray has been hidden too long with an
48 // unseen update notification.
49 scoped_ptr<tray::UpdateNagger> nagger_;
50
41 DISALLOW_COPY_AND_ASSIGN(TrayUpdate); 51 DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
42 }; 52 };
43 53
44 } // namespace internal 54 } // namespace internal
45 } // namespace ash 55 } // namespace ash
46 56
47 #endif // ASH_SYSTEM_TRAY_UPDATE_H_ 57 #endif // ASH_SYSTEM_TRAY_UPDATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698