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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 case NotificationClient::PermissionDenied: 241 case NotificationClient::PermissionDenied:
242 return deniedPermission; 242 return deniedPermission;
243 case NotificationClient::PermissionNotAllowed: 243 case NotificationClient::PermissionNotAllowed:
244 return defaultPermission; 244 return defaultPermission;
245 } 245 }
246 246
247 ASSERT_NOT_REACHED(); 247 ASSERT_NOT_REACHED();
248 return deniedPermission; 248 return deniedPermission;
249 } 249 }
250 250
251 void Notification::requestPermission(ExecutionContext* context, PassRefPtr<Notif icationPermissionCallback> callback) 251 void Notification::requestPermission(ExecutionContext* context, PassOwnPtr<Notif icationPermissionCallback> callback)
252 { 252 {
253 ASSERT(toDocument(context)->page()); 253 ASSERT(toDocument(context)->page());
254 NotificationController::from(toDocument(context)->page())->client()->request Permission(context, callback); 254 NotificationController::from(toDocument(context)->page())->client()->request Permission(context, callback);
255 } 255 }
256 256
257 } // namespace WebCore 257 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/notifications/Notification.h ('k') | Source/modules/notifications/NotificationClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698