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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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 | « ui/message_center/message_center_tray_unittest.cc ('k') | ui/message_center/notification.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_H_ 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_
6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 // Delegate actions. 241 // Delegate actions.
242 void Display() const { delegate()->Display(); } 242 void Display() const { delegate()->Display(); }
243 bool HasClickedListener() const { return delegate()->HasClickedListener(); } 243 bool HasClickedListener() const { return delegate()->HasClickedListener(); }
244 void Click() const { delegate()->Click(); } 244 void Click() const { delegate()->Click(); }
245 void ButtonClick(int index) const { delegate()->ButtonClick(index); } 245 void ButtonClick(int index) const { delegate()->ButtonClick(index); }
246 void Close(bool by_user) const { delegate()->Close(by_user); } 246 void Close(bool by_user) const { delegate()->Close(by_user); }
247 247
248 // Helper method to create a simple system notification. |click_callback| 248 // Helper method to create a simple system notification. |click_callback|
249 // will be invoked when the notification is clicked. 249 // will be invoked when the notification is clicked.
250 static scoped_ptr<Notification> CreateSystemNotification( 250 static std::unique_ptr<Notification> CreateSystemNotification(
251 const std::string& notification_id, 251 const std::string& notification_id,
252 const base::string16& title, 252 const base::string16& title,
253 const base::string16& message, 253 const base::string16& message,
254 const gfx::Image& icon, 254 const gfx::Image& icon,
255 const std::string& system_component_id, 255 const std::string& system_component_id,
256 const base::Closure& click_callback); 256 const base::Closure& click_callback);
257 257
258 protected: 258 protected:
259 Notification& operator=(const Notification& other); 259 Notification& operator=(const Notification& other);
260 260
(...skipping 27 matching lines...) Expand all
288 bool is_read_; // True if this has been seen in the message center. 288 bool is_read_; // True if this has been seen in the message center.
289 289
290 // A proxy object that allows access back to the JavaScript object that 290 // A proxy object that allows access back to the JavaScript object that
291 // represents the notification, for firing events. 291 // represents the notification, for firing events.
292 scoped_refptr<NotificationDelegate> delegate_; 292 scoped_refptr<NotificationDelegate> delegate_;
293 }; 293 };
294 294
295 } // namespace message_center 295 } // namespace message_center
296 296
297 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 297 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_tray_unittest.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698