Chromium Code Reviews| Index: Source/core/dom/Microtask.cpp |
| diff --git a/Source/modules/mediastream/RTCSessionDescriptionCallback.h b/Source/core/dom/Microtask.cpp |
| similarity index 72% |
| copy from Source/modules/mediastream/RTCSessionDescriptionCallback.h |
| copy to Source/core/dom/Microtask.cpp |
| index 678daa7b0d0de42a2dc4f0b115412f71b1755d6b..40e8f0762321371c7a1068e8b5ae40342d0de2d2 100644 |
| --- a/Source/modules/mediastream/RTCSessionDescriptionCallback.h |
| +++ b/Source/core/dom/Microtask.cpp |
| @@ -1,5 +1,5 @@ |
| /* |
| - * Copyright (C) 2012 Google Inc. All rights reserved. |
| + * Copyright (C) 2013 Google Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions |
| @@ -28,21 +28,29 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef RTCSessionDescriptionCallback_h |
| -#define RTCSessionDescriptionCallback_h |
| +#include "config.h" |
| +#include "core/dom/Microtask.h" |
| -#include "wtf/RefCounted.h" |
| +#include "core/dom/CustomElementCallbackDispatcher.h" |
| +#include "core/dom/MutationObserver.h" |
| +#include "wtf/Vector.h" |
| namespace WebCore { |
| -class RTCSessionDescription; |
| +void Microtask::performCheckpoint() |
| +{ |
| + static bool performingCheckpoint = false; |
| + if (performingCheckpoint) |
| + return; |
| + performingCheckpoint = true; |
| -class RTCSessionDescriptionCallback : public RefCounted<RTCSessionDescriptionCallback> { |
| -public: |
| - virtual ~RTCSessionDescriptionCallback() { } |
| - virtual bool handleEvent(RTCSessionDescription*) = 0; |
| -}; |
| + bool workToDo; |
| + do { |
| + MutationObserver::deliverAllMutations(); |
| + workToDo = CustomElementCallbackDispatcher::dispatcher().dispatch(); |
|
rafaelw
2013/06/24 23:15:49
Nit: workToDo => anyWorkDone.
Also, I think it's
|
| + } while (workToDo); |
| -} // namespace WebCore |
| + performingCheckpoint = false; |
| +} |
| -#endif // RTCSessionDescriptionCallback_h |
| +} // namespace WebCore |