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

Side by Side Diff: ash/system/tray/system_tray_item.h

Issue 9580024: ash uber tray: Allow customizing each item depending on whether the user is logged in or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file Created 8 years, 9 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 | « ash/system/tray/system_tray_delegate.h ('k') | ash/system/tray_user.h » ('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_SYSTEM_TRAY_ITEM_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/system/user/login_status.h"
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 13
13 namespace views { 14 namespace views {
14 class View; 15 class View;
15 } 16 }
16 17
17 namespace ash { 18 namespace ash {
18 19
19 class ASH_EXPORT SystemTrayItem { 20 class ASH_EXPORT SystemTrayItem {
20 public: 21 public:
21 SystemTrayItem(); 22 SystemTrayItem();
22 virtual ~SystemTrayItem(); 23 virtual ~SystemTrayItem();
23 24
24 // Returns a view to be displayed in the system tray. If this returns NULL, 25 // Returns a view to be displayed in the system tray. If this returns NULL,
25 // then this item is not displayed in the tray. 26 // then this item is not displayed in the tray.
26 virtual views::View* CreateTrayView() = 0; 27 virtual views::View* CreateTrayView(user::LoginStatus status) = 0;
27 28
28 // Returns a view for the item to be displayed in the list. This view can be 29 // Returns a view for the item to be displayed in the list. This view can be
29 // displayed with a number of other tray items, so this should not be too 30 // displayed with a number of other tray items, so this should not be too
30 // big. 31 // big.
31 virtual views::View* CreateDefaultView() = 0; 32 virtual views::View* CreateDefaultView(user::LoginStatus status) = 0;
32 33
33 // Returns a detailed view for the item. This view is displayed standalone. 34 // Returns a detailed view for the item. This view is displayed standalone.
34 virtual views::View* CreateDetailedView() = 0; 35 virtual views::View* CreateDetailedView(user::LoginStatus status) = 0;
35 36
36 // These functions are called when the corresponding view item is about to be 37 // These functions are called when the corresponding view item is about to be
37 // removed. An item should do appropriate cleanup in these functions. 38 // removed. An item should do appropriate cleanup in these functions.
38 virtual void DestroyTrayView() = 0; 39 virtual void DestroyTrayView() = 0;
39 virtual void DestroyDefaultView() = 0; 40 virtual void DestroyDefaultView() = 0;
40 virtual void DestroyDetailedView() = 0; 41 virtual void DestroyDetailedView() = 0;
41 42
42 // Pops up the detailed view for this item. An item can request to show its 43 // Pops up the detailed view for this item. An item can request to show its
43 // detailed view using this function (e.g. from an observer callback when 44 // detailed view using this function (e.g. from an observer callback when
44 // something, e.g. volume, network availability etc. changes). 45 // something, e.g. volume, network availability etc. changes).
45 void PopupDetailedView(); 46 void PopupDetailedView();
46 47
47 private: 48 private:
48 49
49 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); 50 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
50 }; 51 };
51 52
52 } // namespace ash 53 } // namespace ash
53 54
54 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 55 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | ash/system/tray_user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698