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

Side by Side Diff: ash/system/web_notification/web_notification_tray.h

Issue 2822033002: cros: Use SessionController to enable system tray settings / notifications tray (Closed)
Patch Set: Created 3 years, 8 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
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_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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void UpdateTrayContent(); 128 void UpdateTrayContent();
129 129
130 // The actual process to show the message center. Set |show_settings| to true 130 // The actual process to show the message center. Set |show_settings| to true
131 // if the message center should be initialized with the settings visible. 131 // if the message center should be initialized with the settings visible.
132 // Returns true if the center is successfully created. 132 // Returns true if the center is successfully created.
133 bool ShowMessageCenterInternal(bool show_settings); 133 bool ShowMessageCenterInternal(bool show_settings);
134 134
135 // Queries login status and the status area widget to determine visibility of 135 // Queries login status and the status area widget to determine visibility of
136 // the message center. 136 // the message center.
137 bool ShouldShowMessageCenter(); 137 bool ShouldShowMessageCenter() const;
138 138
139 // Returns true if it should show the quiet mode menu. 139 // Returns true if it should show the quiet mode menu.
140 bool ShouldShowQuietModeMenu(const ui::Event& event); 140 bool ShouldShowQuietModeMenu(const ui::Event& event);
141 141
142 // Shows the quiet mode menu. 142 // Shows the quiet mode menu.
143 void ShowQuietModeMenu(const ui::Event& event); 143 void ShowQuietModeMenu(const ui::Event& event);
144 144
145 // Creates the menu model for quiet mode and returns it. 145 // Creates the menu model for quiet mode and returns it.
146 ui::MenuModel* CreateQuietModeMenu(); 146 ui::MenuModel* CreateQuietModeMenu();
147 147
148 WebNotificationBubbleWrapper* message_center_bubble() const { 148 WebNotificationBubbleWrapper* message_center_bubble() const {
149 return message_center_bubble_.get(); 149 return message_center_bubble_.get();
150 } 150 }
151 151
152 // Returns true if any user is logged in and the system is not at the screen
153 // for adding a secondary user.
154 bool IsLoggedIn() const;
155
156 // Testing accessors. 152 // Testing accessors.
157 bool IsPopupVisible() const; 153 bool IsPopupVisible() const;
158 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); 154 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest();
159 155
160 WmWindow* status_area_window_; 156 WmWindow* status_area_window_;
161 SystemTray* system_tray_; 157 SystemTray* system_tray_;
162 std::unique_ptr<message_center::MessageCenterTray> message_center_tray_; 158 std::unique_ptr<message_center::MessageCenterTray> message_center_tray_;
163 std::unique_ptr<WebNotificationBubbleWrapper> message_center_bubble_; 159 std::unique_ptr<WebNotificationBubbleWrapper> message_center_bubble_;
164 std::unique_ptr<message_center::MessagePopupCollection> popup_collection_; 160 std::unique_ptr<message_center::MessagePopupCollection> popup_collection_;
165 std::unique_ptr<WebNotificationImage> bell_icon_; 161 std::unique_ptr<WebNotificationImage> bell_icon_;
(...skipping 15 matching lines...) Expand all
181 bool should_block_shelf_auto_hide_; 177 bool should_block_shelf_auto_hide_;
182 178
183 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; 179 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_;
184 180
185 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); 181 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
186 }; 182 };
187 183
188 } // namespace ash 184 } // namespace ash
189 185
190 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ 186 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698