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 virtual void SettingsClick(); | 52 // Returns whether the settings click was handled by the delegate. |
| 53 virtual bool SettingsClick(); |
53 | 54 |
54 // To be called in order to detect if a settings button should be displayed. | 55 // To be called in order to detect if a settings button should be displayed. |
55 virtual bool ShouldDisplaySettingsButton(); | 56 virtual bool ShouldDisplaySettingsButton(); |
56 | 57 |
57 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 58 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
58 // To be called to construct the contents view of a popup for notifications | 59 // To be called to construct the contents view of a popup for notifications |
59 // whose type is NOTIFICATION_TYPE_CUSTOM. | 60 // whose type is NOTIFICATION_TYPE_CUSTOM. |
60 virtual std::unique_ptr<CustomContent> CreateCustomContent(); | 61 virtual std::unique_ptr<CustomContent> CreateCustomContent(); |
61 #endif | 62 #endif |
62 | 63 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 110 |
110 private: | 111 private: |
111 ButtonClickCallback button_callback_; | 112 ButtonClickCallback button_callback_; |
112 | 113 |
113 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); | 114 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); |
114 }; | 115 }; |
115 | 116 |
116 } // namespace message_center | 117 } // namespace message_center |
117 | 118 |
118 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ | 119 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ |
OLD | NEW |