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

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

Issue 2668583005: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: Created 3 years, 10 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 "base/strings/string16.h"
15 #include "ui/message_center/message_center_export.h" 15 #include "ui/message_center/message_center_export.h"
16 16
17 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) 17 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
18 #include "ui/message_center/views/custom_notification_content_view_delegate.h" 18 #include "ui/message_center/views/custom_notification_content_view_delegate.h"
19 #endif 19 #endif
20 20
21 namespace message_center { 21 namespace message_center {
22 22
23 class MessageView;
24
23 // Delegate for a notification. This class has two roles: to implement callback 25 // Delegate for a notification. This class has two roles: to implement callback
24 // methods for notification, and to provide an identity of the associated 26 // methods for notification, and to provide an identity of the associated
25 // notification. 27 // notification.
26 class MESSAGE_CENTER_EXPORT NotificationDelegate 28 class MESSAGE_CENTER_EXPORT NotificationDelegate
27 : public base::RefCountedThreadSafe<NotificationDelegate> { 29 : public base::RefCountedThreadSafe<NotificationDelegate> {
28 public: 30 public:
29 // To be called when the desktop notification is actually shown. 31 // To be called when the desktop notification is actually shown.
30 virtual void Display(); 32 virtual void Display();
31 33
32 // To be called when the desktop notification is closed. If closed by a 34 // To be called when the desktop notification is closed. If closed by a
(...skipping 17 matching lines...) Expand all
50 52
51 // 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.
52 virtual void SettingsClick(); 54 virtual void SettingsClick();
53 55
54 // 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.
55 virtual bool ShouldDisplaySettingsButton(); 57 virtual bool ShouldDisplaySettingsButton();
56 58
57 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) 59 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
58 // 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
59 // whose type is NOTIFICATION_TYPE_CUSTOM. 61 // whose type is NOTIFICATION_TYPE_CUSTOM.
60 virtual std::unique_ptr<CustomContent> CreateCustomContent(); 62 virtual std::unique_ptr<CustomContent> CreateCustomContent(
63 MessageView* message_view);
61 #endif 64 #endif
62 65
63 // Indicates whether this notification should be displayed when there is 66 // Indicates whether this notification should be displayed when there is
64 // fullscreen content being displayed. 67 // fullscreen content being displayed.
65 virtual bool ShouldDisplayOverFullscreen() const; 68 virtual bool ShouldDisplayOverFullscreen() const;
66 69
67 protected: 70 protected:
68 virtual ~NotificationDelegate() {} 71 virtual ~NotificationDelegate() {}
69 72
70 private: 73 private:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 112
110 private: 113 private:
111 ButtonClickCallback button_callback_; 114 ButtonClickCallback button_callback_;
112 115
113 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate); 116 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate);
114 }; 117 };
115 118
116 } // namespace message_center 119 } // namespace message_center
117 120
118 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ 121 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698