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

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

Issue 221933013: Show a notification when an ephemeral app consumes excessive disk space (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webkit_storage_monitor
Patch Set: Fix test failures Created 6 years, 8 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
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ui/message_center/notification_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 protected: 69 protected:
70 virtual ~HandleNotificationClickedDelegate(); 70 virtual ~HandleNotificationClickedDelegate();
71 71
72 private: 72 private:
73 std::string id_; 73 std::string id_;
74 base::Closure closure_; 74 base::Closure closure_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(HandleNotificationClickedDelegate); 76 DISALLOW_COPY_AND_ASSIGN(HandleNotificationClickedDelegate);
77 }; 77 };
78 78
79 // A notification delegate which invokes a callback when a notification button
80 // has been clicked.
81 class MESSAGE_CENTER_EXPORT HandleNotificationButtonClickDelegate
82 : public NotificationDelegate {
83 public:
84 typedef base::Callback<void(int)> ButtonClickCallback;
85
86 explicit HandleNotificationButtonClickDelegate(
87 const ButtonClickCallback& button_callback);
88
89 // message_center::NotificationDelegate overrides:
90 virtual void Display() OVERRIDE;
91 virtual void Error() OVERRIDE;
92 virtual void Close(bool by_user) OVERRIDE;
93 virtual void Click() OVERRIDE;
94 virtual void ButtonClick(int button_index) OVERRIDE;
95
96 protected:
97 virtual ~HandleNotificationButtonClickDelegate();
98
99 private:
100 ButtonClickCallback button_callback_;
101
102 DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate);
103 };
104
79 } // namespace message_center 105 } // namespace message_center
80 106
81 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_ 107 #endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ui/message_center/notification_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698