OLD | NEW |
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_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // Shows the quiet mode menu. | 150 // Shows the quiet mode menu. |
151 void ShowQuietModeMenu(const ui::Event& event); | 151 void ShowQuietModeMenu(const ui::Event& event); |
152 | 152 |
153 // Creates the menu model for quiet mode and returns it. | 153 // Creates the menu model for quiet mode and returns it. |
154 ui::MenuModel* CreateQuietModeMenu(); | 154 ui::MenuModel* CreateQuietModeMenu(); |
155 | 155 |
156 WebNotificationBubbleWrapper* message_center_bubble() const { | 156 WebNotificationBubbleWrapper* message_center_bubble() const { |
157 return message_center_bubble_.get(); | 157 return message_center_bubble_.get(); |
158 } | 158 } |
159 | 159 |
| 160 // Returns true if any user is logged in and the system is not at the screen |
| 161 // for adding a secondary user. |
| 162 bool IsLoggedIn() const; |
| 163 |
160 // Testing accessors. | 164 // Testing accessors. |
161 bool IsPopupVisible() const; | 165 bool IsPopupVisible() const; |
162 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); | 166 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); |
163 | 167 |
164 std::unique_ptr<message_center::MessageCenterTray> message_center_tray_; | 168 std::unique_ptr<message_center::MessageCenterTray> message_center_tray_; |
165 std::unique_ptr<WebNotificationBubbleWrapper> message_center_bubble_; | 169 std::unique_ptr<WebNotificationBubbleWrapper> message_center_bubble_; |
166 std::unique_ptr<message_center::MessagePopupCollection> popup_collection_; | 170 std::unique_ptr<message_center::MessagePopupCollection> popup_collection_; |
167 WebNotificationButton* button_; | 171 WebNotificationButton* button_; |
168 | 172 |
169 bool show_message_center_on_unlock_; | 173 bool show_message_center_on_unlock_; |
170 | 174 |
171 bool should_update_tray_content_; | 175 bool should_update_tray_content_; |
172 | 176 |
173 // True when the shelf auto hide behavior has to be blocked. Previously | 177 // True when the shelf auto hide behavior has to be blocked. Previously |
174 // this was done by checking |message_center_bubble_| but actually | 178 // this was done by checking |message_center_bubble_| but actually |
175 // the check can be called when creating this object, so it would cause | 179 // the check can be called when creating this object, so it would cause |
176 // flickers of the shelf from hidden to shown. See: crbug.com/181213 | 180 // flickers of the shelf from hidden to shown. See: crbug.com/181213 |
177 bool should_block_shelf_auto_hide_; | 181 bool should_block_shelf_auto_hide_; |
178 | 182 |
179 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; | 183 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; |
180 | 184 |
181 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 185 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
182 }; | 186 }; |
183 | 187 |
184 } // namespace ash | 188 } // namespace ash |
185 | 189 |
186 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 190 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
OLD | NEW |