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