| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_NOTIFICATION_DELEGATE_H_ | 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ |
| 6 #define UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ | 6 #define UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // To be called when the user clicks a button in a notification. | 42 // To be called when the user clicks a button in a notification. |
| 43 virtual void ButtonClick(int button_index); | 43 virtual void ButtonClick(int button_index); |
| 44 | 44 |
| 45 // To be called when the user types a reply to a notification. | 45 // To be called when the user types a reply to a notification. |
| 46 // TODO(crbug.com/599859) Support this feature in the message center - | 46 // TODO(crbug.com/599859) Support this feature in the message center - |
| 47 // currently it is only supported on Android. | 47 // currently it is only supported on Android. |
| 48 virtual void ButtonClickWithReply(int button_index, | 48 virtual void ButtonClickWithReply(int button_index, |
| 49 const base::string16& reply); | 49 const base::string16& reply); |
| 50 | 50 |
| 51 // To be called when the user clicks the settings button in a notification. | 51 // To be called when the user clicks the settings button in a notification. |
| 52 // Returns whether the settings click was handled by the delegate. | 52 virtual void SettingsClick(); |
| 53 virtual bool SettingsClick(); | |
| 54 | 53 |
| 55 // To be called in order to detect if a settings button should be displayed. | 54 // To be called in order to detect if a settings button should be displayed. |
| 56 virtual bool ShouldDisplaySettingsButton(); | 55 virtual bool ShouldDisplaySettingsButton(); |
| 57 | 56 |
| 58 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 57 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
| 59 // To be called to construct the contents view of a popup for notifications | 58 // To be called to construct the contents view of a popup for notifications |
| 60 // whose type is NOTIFICATION_TYPE_CUSTOM. | 59 // whose type is NOTIFICATION_TYPE_CUSTOM. |
| 61 virtual std::unique_ptr<CustomContent> CreateCustomContent(); | 60 virtual std::unique_ptr<CustomContent> CreateCustomContent(); |
| 62 #endif | 61 #endif |
| 63 | 62 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 109 |
| 111 private: | 110 private: |
| 112 ButtonClickCallback button_callback_; | 111 ButtonClickCallback button_callback_; |
| 113 | 112 |
| 114 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); | 113 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } // namespace message_center | 116 } // namespace message_center |
| 118 | 117 |
| 119 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ | 118 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ |
| OLD | NEW |