| 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_OBSERVER_H_ | 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_OBSERVER_H_ |
| 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_OBSERVER_H_ | 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ui/message_center/message_center_export.h" | 10 #include "ui/message_center/message_center_export.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Called when a click event happens on the notification associated with | 34 // Called when a click event happens on the notification associated with |
| 35 // |notification_id|. | 35 // |notification_id|. |
| 36 virtual void OnNotificationClicked(const std::string& notification_id) {} | 36 virtual void OnNotificationClicked(const std::string& notification_id) {} |
| 37 | 37 |
| 38 // Called when a click event happens on a button indexed by |button_index| | 38 // Called when a click event happens on a button indexed by |button_index| |
| 39 // of the notification associated with |notification_id|. | 39 // of the notification associated with |notification_id|. |
| 40 virtual void OnNotificationButtonClicked(const std::string& notification_id, | 40 virtual void OnNotificationButtonClicked(const std::string& notification_id, |
| 41 int button_index) {} | 41 int button_index) {} |
| 42 | 42 |
| 43 // Called when notification settings button is clicked. | 43 // Called when notification settings button is clicked. The |handled| argument |
| 44 virtual void OnNotificationSettingsClicked() {} | 44 // indicates whether the notification delegate already handled the operation. |
| 45 virtual void OnNotificationSettingsClicked(bool handled) {} |
| 45 | 46 |
| 46 // Called when the notification associated with |notification_id| is actually | 47 // Called when the notification associated with |notification_id| is actually |
| 47 // displayed. | 48 // displayed. |
| 48 virtual void OnNotificationDisplayed( | 49 virtual void OnNotificationDisplayed( |
| 49 const std::string& notification_id, | 50 const std::string& notification_id, |
| 50 const DisplaySource source) {} | 51 const DisplaySource source) {} |
| 51 | 52 |
| 52 // Called when the notification center is shown or hidden. | 53 // Called when the notification center is shown or hidden. |
| 53 virtual void OnCenterVisibilityChanged(Visibility visibility) {} | 54 virtual void OnCenterVisibilityChanged(Visibility visibility) {} |
| 54 | 55 |
| 55 // Called whenever the quiet mode changes as a result of user action or when | 56 // Called whenever the quiet mode changes as a result of user action or when |
| 56 // quiet mode expires. | 57 // quiet mode expires. |
| 57 virtual void OnQuietModeChanged(bool in_quiet_mode) {} | 58 virtual void OnQuietModeChanged(bool in_quiet_mode) {} |
| 58 | 59 |
| 59 // Called when the user locks (or unlocks) the screen. | 60 // Called when the user locks (or unlocks) the screen. |
| 60 virtual void OnLockedStateChanged(bool locked) {} | 61 virtual void OnLockedStateChanged(bool locked) {} |
| 61 | 62 |
| 62 // Called when the blocking state of |blocker| is changed. | 63 // Called when the blocking state of |blocker| is changed. |
| 63 virtual void OnBlockingStateChanged(NotificationBlocker* blocker) {} | 64 virtual void OnBlockingStateChanged(NotificationBlocker* blocker) {} |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace message_center | 67 } // namespace message_center |
| 67 | 68 |
| 68 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_OBSERVER_H_ | 69 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_OBSERVER_H_ |
| OLD | NEW |