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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/Notification.cpp

Issue 1644573002: Notification actions may have an icon url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 287
288 HeapVector<NotificationAction> Notification::actions() const 288 HeapVector<NotificationAction> Notification::actions() const
289 { 289 {
290 HeapVector<NotificationAction> actions; 290 HeapVector<NotificationAction> actions;
291 actions.grow(m_data.actions.size()); 291 actions.grow(m_data.actions.size());
292 292
293 for (size_t i = 0; i < m_data.actions.size(); ++i) { 293 for (size_t i = 0; i < m_data.actions.size(); ++i) {
294 actions[i].setAction(m_data.actions[i].action); 294 actions[i].setAction(m_data.actions[i].action);
295 actions[i].setTitle(m_data.actions[i].title); 295 actions[i].setTitle(m_data.actions[i].title);
296 actions[i].setIcon(m_data.actions[i].icon.string());
296 } 297 }
297 298
298 return actions; 299 return actions;
299 } 300 }
300 301
301 String Notification::permissionString(WebNotificationPermission permission) 302 String Notification::permissionString(WebNotificationPermission permission)
302 { 303 {
303 switch (permission) { 304 switch (permission) {
304 case WebNotificationPermissionAllowed: 305 case WebNotificationPermissionAllowed:
305 return "granted"; 306 return "granted";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 373 }
373 374
374 DEFINE_TRACE(Notification) 375 DEFINE_TRACE(Notification)
375 { 376 {
376 visitor->trace(m_asyncRunner); 377 visitor->trace(m_asyncRunner);
377 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis itor); 378 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis itor);
378 ActiveDOMObject::trace(visitor); 379 ActiveDOMObject::trace(visitor);
379 } 380 }
380 381
381 } // namespace blink 382 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698