OLD | NEW |
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 void Notification::requestPermission(ExecutionContext* context, NotificationPerm
issionCallback* callback) | 289 void Notification::requestPermission(ExecutionContext* context, NotificationPerm
issionCallback* callback) |
290 { | 290 { |
291 // FIXME: Assert that this code-path will only be reached for Document envir
onments | 291 // FIXME: Assert that this code-path will only be reached for Document envir
onments |
292 // when Blink supports [Exposed] annotations on class members in IDL definit
ions. | 292 // when Blink supports [Exposed] annotations on class members in IDL definit
ions. |
293 if (NotificationPermissionClient* permissionClient = NotificationPermissionC
lient::from(context)) | 293 if (NotificationPermissionClient* permissionClient = NotificationPermissionC
lient::from(context)) |
294 permissionClient->requestPermission(context, callback); | 294 permissionClient->requestPermission(context, callback); |
295 } | 295 } |
296 | 296 |
297 bool Notification::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 297 bool Notification::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event) |
298 { | 298 { |
299 ASSERT(executionContext()->isContextThread()); | 299 ASSERT(executionContext()->isContextThread()); |
300 return EventTarget::dispatchEvent(event); | 300 return EventTarget::dispatchEventInternal(event); |
301 } | 301 } |
302 | 302 |
303 const AtomicString& Notification::interfaceName() const | 303 const AtomicString& Notification::interfaceName() const |
304 { | 304 { |
305 return EventTargetNames::Notification; | 305 return EventTargetNames::Notification; |
306 } | 306 } |
307 | 307 |
308 void Notification::stop() | 308 void Notification::stop() |
309 { | 309 { |
310 notificationManager()->notifyDelegateDestroyed(this); | 310 notificationManager()->notifyDelegateDestroyed(this); |
(...skipping 16 matching lines...) Expand all Loading... |
327 return ScriptValue(scriptState, m_serializedData->deserialize(scriptState->i
solate())); | 327 return ScriptValue(scriptState, m_serializedData->deserialize(scriptState->i
solate())); |
328 } | 328 } |
329 | 329 |
330 DEFINE_TRACE(Notification) | 330 DEFINE_TRACE(Notification) |
331 { | 331 { |
332 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis
itor); | 332 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis
itor); |
333 ActiveDOMObject::trace(visitor); | 333 ActiveDOMObject::trace(visitor); |
334 } | 334 } |
335 | 335 |
336 } // namespace blink | 336 } // namespace blink |
OLD | NEW |