Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/notification_ui_manager_android.h" | 5 #include "chrome/browser/notifications/notification_ui_manager_android.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 Java_NotificationUIManager_displayNotification( | 145 Java_NotificationUIManager_displayNotification( |
| 146 env, | 146 env, |
| 147 java_object_.obj(), | 147 java_object_.obj(), |
| 148 persistent_notification_id, | 148 persistent_notification_id, |
| 149 origin.obj(), | 149 origin.obj(), |
| 150 tag.obj(), | 150 tag.obj(), |
| 151 title.obj(), | 151 title.obj(), |
| 152 body.obj(), | 152 body.obj(), |
| 153 icon.obj(), | 153 icon.obj(), |
| 154 vibration_pattern.obj(), | 154 vibration_pattern.obj(), |
| 155 notification.timestamp().ToJavaTime(), | |
|
johnme
2015/10/20 17:12:21
FYI ToJavaTime can underflow for times in between
Peter Beverloo
2016/01/28 17:18:29
Acknowledged.
| |
| 155 notification.silent(), | 156 notification.silent(), |
| 156 action_titles.obj()); | 157 action_titles.obj()); |
| 157 | 158 |
| 158 regenerated_notification_infos_[persistent_notification_id] = | 159 regenerated_notification_infos_[persistent_notification_id] = |
| 159 std::make_pair(origin_url.spec(), notification.tag()); | 160 std::make_pair(origin_url.spec(), notification.tag()); |
| 160 | 161 |
| 161 notification.delegate()->Display(); | 162 notification.delegate()->Display(); |
| 162 } | 163 } |
| 163 | 164 |
| 164 bool NotificationUIManagerAndroid::Update(const Notification& notification, | 165 bool NotificationUIManagerAndroid::Update(const Notification& notification, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 return false; | 233 return false; |
| 233 } | 234 } |
| 234 | 235 |
| 235 void NotificationUIManagerAndroid::CancelAll() { | 236 void NotificationUIManagerAndroid::CancelAll() { |
| 236 NOTREACHED(); | 237 NOTREACHED(); |
| 237 } | 238 } |
| 238 | 239 |
| 239 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { | 240 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { |
| 240 return RegisterNativesImpl(env); | 241 return RegisterNativesImpl(env); |
| 241 } | 242 } |
| OLD | NEW |