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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 regenerated_notification_infos_[persistent_notification_id] = | 63 regenerated_notification_infos_[persistent_notification_id] = |
64 std::make_pair(origin.spec(), tag); | 64 std::make_pair(origin.spec(), tag); |
65 | 65 |
66 // TODO(peter): Rather than assuming that the last used profile is the | 66 // TODO(peter): Rather than assuming that the last used profile is the |
67 // appropriate one for this notification, the used profile should be | 67 // appropriate one for this notification, the used profile should be |
68 // stored as part of the notification's data. See https://crbug.com/437574. | 68 // stored as part of the notification's data. See https://crbug.com/437574. |
69 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( | 69 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( |
70 ProfileManager::GetLastUsedProfile(), | 70 ProfileManager::GetLastUsedProfile(), |
71 persistent_notification_id, | 71 persistent_notification_id, |
72 origin); | 72 origin, |
| 73 -1 /* action_index */); |
73 | 74 |
74 return true; | 75 return true; |
75 } | 76 } |
76 | 77 |
77 bool NotificationUIManagerAndroid::OnNotificationClosed( | 78 bool NotificationUIManagerAndroid::OnNotificationClosed( |
78 JNIEnv* env, | 79 JNIEnv* env, |
79 jobject java_object, | 80 jobject java_object, |
80 jlong persistent_notification_id, | 81 jlong persistent_notification_id, |
81 jstring java_origin, | 82 jstring java_origin, |
82 jstring java_tag) { | 83 jstring java_tag) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 return false; | 223 return false; |
223 } | 224 } |
224 | 225 |
225 void NotificationUIManagerAndroid::CancelAll() { | 226 void NotificationUIManagerAndroid::CancelAll() { |
226 NOTREACHED(); | 227 NOTREACHED(); |
227 } | 228 } |
228 | 229 |
229 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { | 230 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { |
230 return RegisterNativesImpl(env); | 231 return RegisterNativesImpl(env); |
231 } | 232 } |
OLD | NEW |