Chromium Code Reviews| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/strings/string16.h" | |
| 14 #include "ui/message_center/message_center_export.h" | 15 #include "ui/message_center/message_center_export.h" |
| 15 | 16 |
| 16 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 17 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
| 17 namespace views { | 18 namespace views { |
| 18 class View; | 19 class View; |
| 19 } | 20 } |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 namespace message_center { | 23 namespace message_center { |
| 23 | 24 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 36 | 37 |
| 37 // Returns true if the delegate can handle click event. | 38 // Returns true if the delegate can handle click event. |
| 38 virtual bool HasClickedListener(); | 39 virtual bool HasClickedListener(); |
| 39 | 40 |
| 40 // To be called when a desktop notification is clicked. | 41 // To be called when a desktop notification is clicked. |
| 41 virtual void Click(); | 42 virtual void Click(); |
| 42 | 43 |
| 43 // To be called when the user clicks a button in a notification. | 44 // To be called when the user clicks a button in a notification. |
| 44 virtual void ButtonClick(int button_index); | 45 virtual void ButtonClick(int button_index); |
| 45 | 46 |
| 47 // To be called when the user types a reply to a notification. | |
| 48 // TODO(crbug.com/599859) Support this feature in the message center. | |
|
Peter Beverloo
2016/10/12 13:58:31
Sorry, one more addendum: it would be good to note
awdf
2016/10/12 17:04:01
Done.
| |
| 49 virtual void ButtonClickWithReply(int button_index, | |
| 50 const base::string16& reply); | |
| 51 | |
| 46 // To be called when the user clicks the settings button in a notification. | 52 // To be called when the user clicks the settings button in a notification. |
| 47 virtual void SettingsClick(); | 53 virtual void SettingsClick(); |
| 48 | 54 |
| 49 // 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. |
| 50 virtual bool ShouldDisplaySettingsButton(); | 56 virtual bool ShouldDisplaySettingsButton(); |
| 51 | 57 |
| 52 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 58 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
| 53 // 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 |
| 54 // whose type is NOTIFICATION_TYPE_CUSTOM. | 60 // whose type is NOTIFICATION_TYPE_CUSTOM. |
| 55 virtual std::unique_ptr<views::View> CreateCustomContent(); | 61 virtual std::unique_ptr<views::View> CreateCustomContent(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 | 110 |
| 105 private: | 111 private: |
| 106 ButtonClickCallback button_callback_; | 112 ButtonClickCallback button_callback_; |
| 107 | 113 |
| 108 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); | 114 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); |
| 109 }; | 115 }; |
| 110 | 116 |
| 111 } // namespace message_center | 117 } // namespace message_center |
| 112 | 118 |
| 113 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ | 119 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ |
| OLD | NEW |