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

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

Issue 344763002: Rename notification_id() to disambiguate its meaning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 6 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // A unique identifier used to update (replace) or remove a notification. 75 // A unique identifier used to update (replace) or remove a notification.
76 const base::string16& replace_id() const { return replace_id_; } 76 const base::string16& replace_id() const { return replace_id_; }
77 77
78 // A url for the button icons to be shown (optional). 78 // A url for the button icons to be shown (optional).
79 const GURL& button_one_icon_url() const { return button_one_icon_url_; } 79 const GURL& button_one_icon_url() const { return button_one_icon_url_; }
80 const GURL& button_two_icon_url() const { return button_two_icon_url_; } 80 const GURL& button_two_icon_url() const { return button_two_icon_url_; }
81 81
82 // A url for the image to be shown (optional). 82 // A url for the image to be shown (optional).
83 const GURL& image_url() const { return image_url_; } 83 const GURL& image_url() const { return image_url_; }
84 84
85 std::string notification_id() const { return delegate()->id(); } 85 // Id of the delegate embedded inside this instance.
86 std::string delegate_id() const { return delegate()->id(); }
86 int process_id() const { return delegate()->process_id(); } 87 int process_id() const { return delegate()->process_id(); }
87 88
88 content::WebContents* GetWebContents() const { 89 content::WebContents* GetWebContents() const {
89 return delegate()->GetWebContents(); 90 return delegate()->GetWebContents();
90 } 91 }
91 void DoneRendering() { delegate()->ReleaseRenderViewHost(); } 92 void DoneRendering() { delegate()->ReleaseRenderViewHost(); }
92 93
93 NotificationDelegate* delegate() const { return delegate_.get(); } 94 NotificationDelegate* delegate() const { return delegate_.get(); }
94 95
95 private: 96 private:
(...skipping 20 matching lines...) Expand all
116 117
117 // The user-supplied replace ID for the notification. 118 // The user-supplied replace ID for the notification.
118 base::string16 replace_id_; 119 base::string16 replace_id_;
119 120
120 // A proxy object that allows access back to the JavaScript object that 121 // A proxy object that allows access back to the JavaScript object that
121 // represents the notification, for firing events. 122 // represents the notification, for firing events.
122 scoped_refptr<NotificationDelegate> delegate_; 123 scoped_refptr<NotificationDelegate> delegate_;
123 }; 124 };
124 125
125 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ 126 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698