Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Side by Side Diff: ui/message_center/notification_delegate.h

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: include base/logging.h for NOTIMPLEMENTED Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 -
49 // currently it is only supported on Android.
50 virtual void ButtonClickWithReply(int button_index,
51 const base::string16& reply);
52
46 // To be called when the user clicks the settings button in a notification. 53 // To be called when the user clicks the settings button in a notification.
47 virtual void SettingsClick(); 54 virtual void SettingsClick();
48 55
49 // To be called in order to detect if a settings button should be displayed. 56 // To be called in order to detect if a settings button should be displayed.
50 virtual bool ShouldDisplaySettingsButton(); 57 virtual bool ShouldDisplaySettingsButton();
51 58
52 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) 59 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
53 // To be called to construct the contents view of a popup for notifications 60 // To be called to construct the contents view of a popup for notifications
54 // whose type is NOTIFICATION_TYPE_CUSTOM. 61 // whose type is NOTIFICATION_TYPE_CUSTOM.
55 virtual std::unique_ptr<views::View> CreateCustomContent(); 62 virtual std::unique_ptr<views::View> CreateCustomContent();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 111
105 private: 112 private:
106 ButtonClickCallback button_callback_; 113 ButtonClickCallback button_callback_;
107 114
108 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); 115 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate);
109 }; 116 };
110 117
111 } // namespace message_center 118 } // namespace message_center
112 119
113 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ 120 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698