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

Side by Side Diff: chrome/browser/notifications/notification_ui_manager_android.cc

Issue 1693583002: Add browser test for notification action icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ActionIconToJava
Patch Set: Created 4 years, 10 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 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 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/context_utils.h" 10 #include "base/android/context_utils.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 ScopedJavaLocalRef<jintArray> vibration_pattern = 177 ScopedJavaLocalRef<jintArray> vibration_pattern =
178 base::android::ToJavaIntArray(env, notification.vibration_pattern()); 178 base::android::ToJavaIntArray(env, notification.vibration_pattern());
179 179
180 ScopedJavaLocalRef<jstring> profile_id = 180 ScopedJavaLocalRef<jstring> profile_id =
181 ConvertUTF8ToJavaString(env, profile->GetPath().BaseName().value()); 181 ConvertUTF8ToJavaString(env, profile->GetPath().BaseName().value());
182 182
183 Java_NotificationUIManager_displayNotification( 183 Java_NotificationUIManager_displayNotification(
184 env, java_object_.obj(), persistent_notification_id, origin.obj(), 184 env, java_object_.obj(), persistent_notification_id, origin.obj(),
185 profile_id.obj(), profile->IsOffTheRecord(), tag.obj(), title.obj(), 185 profile_id.obj(), profile->IsOffTheRecord(), tag.obj(), title.obj(),
186 body.obj(), icon.obj(), vibration_pattern.obj(), 186 body.obj(), notification_icon.obj(), vibration_pattern.obj(),
187 notification.timestamp().ToJavaTime(), notification.renotify(), 187 notification.timestamp().ToJavaTime(), notification.renotify(),
188 notification.silent(), action_titles.obj(), action_icons.obj()); 188 notification.silent(), action_titles.obj(), action_icons.obj());
189 189
190 regenerated_notification_infos_[persistent_notification_id] = 190 regenerated_notification_infos_[persistent_notification_id] =
191 std::make_pair(origin_url.spec(), notification.tag()); 191 std::make_pair(origin_url.spec(), notification.tag());
192 192
193 notification.delegate()->Display(); 193 notification.delegate()->Display();
194 } 194 }
195 195
196 bool NotificationUIManagerAndroid::Update(const Notification& notification, 196 bool NotificationUIManagerAndroid::Update(const Notification& notification,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 return false; 264 return false;
265 } 265 }
266 266
267 void NotificationUIManagerAndroid::CancelAll() { 267 void NotificationUIManagerAndroid::CancelAll() {
268 NOTREACHED(); 268 NOTREACHED();
269 } 269 }
270 270
271 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) { 271 bool NotificationUIManagerAndroid::RegisterNotificationUIManager(JNIEnv* env) {
272 return RegisterNativesImpl(env); 272 return RegisterNativesImpl(env);
273 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698