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

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

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win browsertests. Created 7 years, 7 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void DoneRendering() { delegate()->ReleaseRenderViewHost(); } 114 void DoneRendering() { delegate()->ReleaseRenderViewHost(); }
115 115
116 std::string notification_id() const { return delegate()->id(); } 116 std::string notification_id() const { return delegate()->id(); }
117 117
118 int process_id() const { return delegate()->process_id(); } 118 int process_id() const { return delegate()->process_id(); }
119 119
120 content::RenderViewHost* GetRenderViewHost() const { 120 content::RenderViewHost* GetRenderViewHost() const {
121 return delegate()->GetRenderViewHost(); 121 return delegate()->GetRenderViewHost();
122 } 122 }
123 123
124 private:
125 NotificationDelegate* delegate() const { return delegate_.get(); } 124 NotificationDelegate* delegate() const { return delegate_.get(); }
126 125
126 private:
127 // The type of notification we'd like displayed. 127 // The type of notification we'd like displayed.
128 message_center::NotificationType type_; 128 message_center::NotificationType type_;
129 129
130 // The Origin of the page/worker which created this notification. 130 // The Origin of the page/worker which created this notification.
131 GURL origin_url_; 131 GURL origin_url_;
132 132
133 // Image data for the associated icon, used by Ash when available. 133 // Image data for the associated icon, used by Ash when available.
134 gfx::Image icon_; 134 gfx::Image icon_;
135 135
136 // URL for the icon associated with the notification. Requires delegate_ 136 // URL for the icon associated with the notification. Requires delegate_
(...skipping 20 matching lines...) Expand all
157 string16 replace_id_; 157 string16 replace_id_;
158 158
159 scoped_ptr<DictionaryValue> optional_fields_; 159 scoped_ptr<DictionaryValue> optional_fields_;
160 160
161 // A proxy object that allows access back to the JavaScript object that 161 // A proxy object that allows access back to the JavaScript object that
162 // represents the notification, for firing events. 162 // represents the notification, for firing events.
163 scoped_refptr<NotificationDelegate> delegate_; 163 scoped_refptr<NotificationDelegate> delegate_;
164 }; 164 };
165 165
166 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ 166 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698