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

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

Issue 2491033006: Adjust positioning of cros tray bubbles. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/public/cpp/shelf_types.h" 10 #include "ash/public/cpp/shelf_types.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Hides the detailed view for this item. Disable hiding animation if 124 // Hides the detailed view for this item. Disable hiding animation if
125 // |animate| is false. 125 // |animate| is false.
126 void HideDetailedView(bool animate); 126 void HideDetailedView(bool animate);
127 127
128 // Shows a notification for this item. 128 // Shows a notification for this item.
129 void ShowNotificationView(); 129 void ShowNotificationView();
130 130
131 // Hides the notification for this item. 131 // Hides the notification for this item.
132 void HideNotificationView(); 132 void HideNotificationView();
133 133
134 // Returns true if item should hide the arrow.
135 virtual bool ShouldHideArrow() const;
136
137 // Returns true if this item needs to force the shelf to be visible when 134 // Returns true if this item needs to force the shelf to be visible when
138 // the shelf is in the auto-hide state. Default is true. 135 // the shelf is in the auto-hide state. Default is true.
139 virtual bool ShouldShowShelf() const; 136 virtual bool ShouldShowShelf() const;
140 137
141 // Returns the system tray that this item belongs to. 138 // Returns the system tray that this item belongs to.
142 SystemTray* system_tray() const { return system_tray_; } 139 SystemTray* system_tray() const { return system_tray_; }
143 140
144 bool restore_focus() const { return restore_focus_; } 141 bool restore_focus() const { return restore_focus_; }
145 void set_restore_focus(bool restore_focus) { restore_focus_ = restore_focus; } 142 void set_restore_focus(bool restore_focus) { restore_focus_ = restore_focus; }
146 143
147 private: 144 private:
148 // Accesses uma_type(). 145 // Accesses uma_type().
149 friend class SystemTrayBubble; 146 friend class SystemTrayBubble;
150 147
151 UmaType uma_type() const { return uma_type_; } 148 UmaType uma_type() const { return uma_type_; }
152 149
153 SystemTray* system_tray_; 150 SystemTray* system_tray_;
154 UmaType uma_type_; 151 UmaType uma_type_;
155 bool restore_focus_; 152 bool restore_focus_;
156 153
157 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); 154 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
158 }; 155 };
159 156
160 } // namespace ash 157 } // namespace ash
161 158
162 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ 159 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_bubble.cc ('k') | ash/common/system/tray/system_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698