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

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

Issue 10809008: Make spacing between uber tray items consistent with UI spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor UpdateAfterShelfAlignment from CreateTrayView to SystemTrayItem. Created 8 years, 5 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.cc ('k') | ash/system/tray/system_tray_item.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_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 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/system/user/login_status.h" 9 #include "ash/system/user/login_status.h"
10 #include "ash/wm/shelf_types.h" 10 #include "ash/wm/shelf_types.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 13
14 namespace views { 14 namespace views {
15 class View; 15 class View;
16 } 16 }
17 17
18 namespace ash { 18 namespace ash {
19 19
20 namespace internal {
21 class TrayItemView;
22 }
23
20 class ASH_EXPORT SystemTrayItem { 24 class ASH_EXPORT SystemTrayItem {
21 public: 25 public:
22 SystemTrayItem(); 26 SystemTrayItem();
23 virtual ~SystemTrayItem(); 27 virtual ~SystemTrayItem();
24 28
25 // Create* functions may return NULL if nothing should be displayed for the 29 // Create* functions may return NULL if nothing should be displayed for the
26 // type of view. The default implementations return NULL. 30 // type of view. The default implementations return NULL.
27 31
28 // Returns a view to be displayed in the system tray. If this returns NULL, 32 // Returns a view to be displayed in the system tray. If this returns NULL,
29 // then this item is not displayed in the tray. 33 // then this item is not displayed in the tray.
(...skipping 26 matching lines...) Expand all
56 // Updates the tray view (if applicable) when the user's login status changes. 60 // Updates the tray view (if applicable) when the user's login status changes.
57 // It is not necessary the update the default or detailed view, since the 61 // It is not necessary the update the default or detailed view, since the
58 // default/detailed popup is closed when login status changes. The default 62 // default/detailed popup is closed when login status changes. The default
59 // implementation does nothing. 63 // implementation does nothing.
60 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status); 64 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status);
61 65
62 // Updates the tray view (if applicable) when shelf's alignment changes. 66 // Updates the tray view (if applicable) when shelf's alignment changes.
63 // The default implementation does nothing. 67 // The default implementation does nothing.
64 virtual void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment); 68 virtual void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment);
65 69
70 // Sets the empty border of an image tray item for adjusting the space
71 // around it.
72 virtual void SetTrayImageItemBorder(views::View* tray_view,
73 ShelfAlignment alignment);
74 // Sets the empty border around a label tray item for adjusting the space
75 // around it.
76 virtual void SetTrayLabelItemBorder(internal::TrayItemView* tray_view,
77 ShelfAlignment alignment);
sadrul 2012/07/23 16:25:03 Until the refactoring, these do not fit in well in
jennyz 2012/07/23 17:22:42 Done.
78
66 // Shows the detailed view for this item. If the main popup for the tray is 79 // Shows the detailed view for this item. If the main popup for the tray is
67 // currently visible, then making this call would use the existing window to 80 // currently visible, then making this call would use the existing window to
68 // display the detailed item. The detailed item will inherit the bounds of the 81 // display the detailed item. The detailed item will inherit the bounds of the
69 // existing window. 82 // existing window.
70 // If there is no existing view, then this is equivalent to calling 83 // If there is no existing view, then this is equivalent to calling
71 // PopupDetailedView(0, true). 84 // PopupDetailedView(0, true).
72 void TransitionDetailedView(); 85 void TransitionDetailedView();
73 86
74 // Pops up the detailed view for this item. An item can request to show its 87 // Pops up the detailed view for this item. An item can request to show its
75 // detailed view using this function (e.g. from an observer callback when 88 // detailed view using this function (e.g. from an observer callback when
(...skipping 17 matching lines...) Expand all
93 void HideNotificationView(); 106 void HideNotificationView();
94 107
95 private: 108 private:
96 109
97 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); 110 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
98 }; 111 };
99 112
100 } // namespace ash 113 } // namespace ash
101 114
102 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 115 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698