| 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 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" | 5 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 Notification ui_notification(notification_type, | 145 Notification ui_notification(notification_type, |
| 146 GetOriginUrl(), | 146 GetOriginUrl(), |
| 147 GetAppIconUrl(), | 147 GetAppIconUrl(), |
| 148 heading, | 148 heading, |
| 149 text, | 149 text, |
| 150 WebKit::WebTextDirectionDefault, | 150 WebKit::WebTextDirectionDefault, |
| 151 display_source, | 151 display_source, |
| 152 replace_key, | 152 replace_key, |
| 153 &optional_fields, | 153 &optional_fields, |
| 154 delegate); | 154 delegate.get()); |
| 155 | 155 |
| 156 notification_manager->Add(ui_notification, profile); | 156 notification_manager->Add(ui_notification, profile); |
| 157 } else { | 157 } else { |
| 158 | 158 |
| 159 Notification ui_notification(GetOriginUrl(), | 159 Notification ui_notification(GetOriginUrl(), |
| 160 GetAppIconUrl(), | 160 GetAppIconUrl(), |
| 161 heading, | 161 heading, |
| 162 text, | 162 text, |
| 163 WebKit::WebTextDirectionDefault, | 163 WebKit::WebTextDirectionDefault, |
| 164 display_source, | 164 display_source, |
| 165 replace_key, | 165 replace_key, |
| 166 delegate); | 166 delegate.get()); |
| 167 | 167 |
| 168 notification_manager->Add(ui_notification, profile); | 168 notification_manager->Add(ui_notification, profile); |
| 169 | 169 |
| 170 } | 170 } |
| 171 | 171 |
| 172 DVLOG(1) << "Showing Synced Notification! " << heading << " " << text | 172 DVLOG(1) << "Showing Synced Notification! " << heading << " " << text |
| 173 << " " << GetAppIconUrl() << " " << replace_key << " " | 173 << " " << GetAppIconUrl() << " " << replace_key << " " |
| 174 << GetReadState(); | 174 << GetReadState(); |
| 175 | 175 |
| 176 return; | 176 return; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 int index) const { | 472 int index) const { |
| 473 if (specifics_.coalesced_notification().render_info().expanded_info(). | 473 if (specifics_.coalesced_notification().render_info().expanded_info(). |
| 474 collapsed_info_size() < index + 1) | 474 collapsed_info_size() < index + 1) |
| 475 return std::string(); | 475 return std::string(); |
| 476 | 476 |
| 477 return specifics_.coalesced_notification().render_info().expanded_info(). | 477 return specifics_.coalesced_notification().render_info().expanded_info(). |
| 478 collapsed_info(index).simple_collapsed_layout().description(); | 478 collapsed_info(index).simple_collapsed_layout().description(); |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace notifier | 481 } // namespace notifier |
| OLD | NEW |