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

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

Issue 1241613004: Rework dispatchEvent so it is consistent for isTrusted support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work around MSVC optimization bug Created 5 years, 5 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698