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

Side by Side Diff: chrome/browser/notifications/notification.h

Issue 667283002: Standardize usage of virtual/override/final in chrome/browser/notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 30 matching lines...) Expand all
41 blink::WebTextDirection dir, 41 blink::WebTextDirection dir,
42 const message_center::NotifierId& notifier_id, 42 const message_center::NotifierId& notifier_id,
43 const base::string16& display_source, 43 const base::string16& display_source,
44 const base::string16& replace_id, 44 const base::string16& replace_id,
45 const message_center::RichNotificationData& rich_notification_data, 45 const message_center::RichNotificationData& rich_notification_data,
46 NotificationDelegate* delegate); 46 NotificationDelegate* delegate);
47 47
48 Notification(const std::string& id, const Notification& notification); 48 Notification(const std::string& id, const Notification& notification);
49 49
50 Notification(const Notification& notification); 50 Notification(const Notification& notification);
51 virtual ~Notification(); 51 ~Notification() override;
52 Notification& operator=(const Notification& notification); 52 Notification& operator=(const Notification& notification);
53 53
54 // The origin URL of the script which requested the notification. 54 // The origin URL of the script which requested the notification.
55 const GURL& origin_url() const { return origin_url_; } 55 const GURL& origin_url() const { return origin_url_; }
56 56
57 // A unique identifier used to update (replace) or remove a notification. 57 // A unique identifier used to update (replace) or remove a notification.
58 const base::string16& replace_id() const { return replace_id_; } 58 const base::string16& replace_id() const { return replace_id_; }
59 59
60 // Id of the delegate embedded inside this instance. 60 // Id of the delegate embedded inside this instance.
61 std::string delegate_id() const { return delegate()->id(); } 61 std::string delegate_id() const { return delegate()->id(); }
62 62
63 NotificationDelegate* delegate() const { return delegate_.get(); } 63 NotificationDelegate* delegate() const { return delegate_.get(); }
64 64
65 private: 65 private:
66 // The Origin of the page/worker which created this notification. 66 // The Origin of the page/worker which created this notification.
67 GURL origin_url_; 67 GURL origin_url_;
68 68
69 // The user-supplied replace ID for the notification. 69 // The user-supplied replace ID for the notification.
70 base::string16 replace_id_; 70 base::string16 replace_id_;
71 71
72 // A proxy object that allows access back to the JavaScript object that 72 // A proxy object that allows access back to the JavaScript object that
73 // represents the notification, for firing events. 73 // represents the notification, for firing events.
74 scoped_refptr<NotificationDelegate> delegate_; 74 scoped_refptr<NotificationDelegate> delegate_;
75 }; 75 };
76 76
77 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ 77 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698