OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ | 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ |
6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ | 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ |
7 | 7 |
8 #include "ui/message_center/message_center_export.h" | 8 #include "ui/message_center/message_center_export.h" |
9 | 9 |
10 namespace message_center { | 10 namespace message_center { |
11 | 11 |
| 12 class MessageCenterTray; |
| 13 |
12 // A MessageCenterTrayDelegate class is responsible for managing the various UI | 14 // A MessageCenterTrayDelegate class is responsible for managing the various UI |
13 // surfaces that should be displayed when the MessageCenter is changed. | 15 // surfaces that should be displayed when the MessageCenter is changed. |
14 class MESSAGE_CENTER_EXPORT MessageCenterTrayDelegate { | 16 class MESSAGE_CENTER_EXPORT MessageCenterTrayDelegate { |
15 public: | 17 public: |
16 virtual ~MessageCenterTrayDelegate() {}; | 18 virtual ~MessageCenterTrayDelegate() {}; |
17 | 19 |
18 // Called whenever a change to the visible UI has occurred. | 20 // Called whenever a change to the visible UI has occurred. |
19 virtual void OnMessageCenterTrayChanged() = 0; | 21 virtual void OnMessageCenterTrayChanged() = 0; |
20 | 22 |
21 // Display the popup bubbles for new notifications to the user. Returns true | 23 // Display the popup bubbles for new notifications to the user. Returns true |
22 // if popups were actually displayed to the user. | 24 // if popups were actually displayed to the user. |
23 virtual bool ShowPopups() = 0; | 25 virtual bool ShowPopups() = 0; |
24 | 26 |
25 // Remove the popup bubbles from the UI. | 27 // Remove the popup bubbles from the UI. |
26 virtual void HidePopups() = 0; | 28 virtual void HidePopups() = 0; |
27 | 29 |
28 // Display the message center containing all undismissed notifications to the | 30 // Display the message center containing all undismissed notifications to the |
29 // user. Returns true if the center was actually displayed to the user. | 31 // user. Returns true if the center was actually displayed to the user. |
30 virtual bool ShowMessageCenter() = 0; | 32 virtual bool ShowMessageCenter() = 0; |
31 | 33 |
32 // Remove the message center from the UI. | 34 // Remove the message center from the UI. |
33 virtual void HideMessageCenter() = 0; | 35 virtual void HideMessageCenter() = 0; |
34 | 36 |
35 // Display the notifier settings as a bubble. | 37 // Display the notifier settings as a bubble. |
36 virtual bool ShowNotifierSettings() = 0; | 38 virtual bool ShowNotifierSettings() = 0; |
37 | 39 |
38 // Show a platform-specific UI that informs the user how to open the message | 40 // Show a platform-specific UI that informs the user how to open the message |
39 // center. | 41 // center. |
40 virtual void DisplayFirstRunBalloon() {}; | 42 virtual void DisplayFirstRunBalloon() {} |
| 43 |
| 44 virtual MessageCenterTray* GetMessageCenterTray() = 0; |
41 }; | 45 }; |
42 | 46 |
43 } // namespace message_center | 47 } // namespace message_center |
44 | 48 |
45 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ | 49 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_DELEGATE_H_ |
OLD | NEW |