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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp

Issue 2588603002: Specify TaskType of posted Task explicitly in media elements (12) (Closed)
Patch Set: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 27
28 #include "bindings/core/v8/Dictionary.h" 28 #include "bindings/core/v8/Dictionary.h"
29 #include "bindings/core/v8/ExceptionMessages.h" 29 #include "bindings/core/v8/ExceptionMessages.h"
30 #include "bindings/core/v8/ExceptionState.h" 30 #include "bindings/core/v8/ExceptionState.h"
31 #include "bindings/core/v8/ScriptPromiseResolver.h" 31 #include "bindings/core/v8/ScriptPromiseResolver.h"
32 #include "bindings/core/v8/ScriptState.h" 32 #include "bindings/core/v8/ScriptState.h"
33 #include "core/dom/DOMException.h" 33 #include "core/dom/DOMException.h"
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "core/dom/ExceptionCode.h" 35 #include "core/dom/ExceptionCode.h"
36 #include "core/dom/ExecutionContextTask.h" 36 #include "core/dom/ExecutionContextTask.h"
37 #include "core/dom/TaskRunnerHelper.h"
37 #include "core/frame/Settings.h" 38 #include "core/frame/Settings.h"
38 #include "core/html/HTMLMediaElement.h" 39 #include "core/html/HTMLMediaElement.h"
39 #include "core/inspector/ConsoleMessage.h" 40 #include "core/inspector/ConsoleMessage.h"
40 #include "core/inspector/ConsoleTypes.h" 41 #include "core/inspector/ConsoleTypes.h"
41 #include "modules/mediastream/MediaStream.h" 42 #include "modules/mediastream/MediaStream.h"
42 #include "modules/webaudio/AnalyserNode.h" 43 #include "modules/webaudio/AnalyserNode.h"
43 #include "modules/webaudio/AudioBuffer.h" 44 #include "modules/webaudio/AudioBuffer.h"
44 #include "modules/webaudio/AudioBufferCallback.h" 45 #include "modules/webaudio/AudioBufferCallback.h"
45 #include "modules/webaudio/AudioBufferSourceNode.h" 46 #include "modules/webaudio/AudioBufferSourceNode.h"
46 #include "modules/webaudio/AudioContext.h" 47 #include "modules/webaudio/AudioContext.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if (newState == m_contextState) { 609 if (newState == m_contextState) {
609 // DCHECKs above failed; just return. 610 // DCHECKs above failed; just return.
610 return; 611 return;
611 } 612 }
612 613
613 m_contextState = newState; 614 m_contextState = newState;
614 615
615 // Notify context that state changed 616 // Notify context that state changed
616 if (getExecutionContext()) 617 if (getExecutionContext())
617 getExecutionContext()->postTask( 618 getExecutionContext()->postTask(
618 BLINK_FROM_HERE, 619 TaskType::MediaElementEvent, BLINK_FROM_HERE,
619 createSameThreadTask(&BaseAudioContext::notifyStateChange, 620 createSameThreadTask(&BaseAudioContext::notifyStateChange,
620 wrapPersistent(this))); 621 wrapPersistent(this)));
621 } 622 }
622 623
623 void BaseAudioContext::notifyStateChange() { 624 void BaseAudioContext::notifyStateChange() {
624 dispatchEvent(Event::create(EventTypeNames::statechange)); 625 dispatchEvent(Event::create(EventTypeNames::statechange));
625 } 626 }
626 627
627 void BaseAudioContext::notifySourceNodeFinishedProcessing( 628 void BaseAudioContext::notifySourceNodeFinishedProcessing(
628 AudioHandler* handler) { 629 AudioHandler* handler) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 } 880 }
880 881
881 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { 882 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const {
882 if (getExecutionContext()) 883 if (getExecutionContext())
883 return getExecutionContext()->getSecurityOrigin(); 884 return getExecutionContext()->getSecurityOrigin();
884 885
885 return nullptr; 886 return nullptr;
886 } 887 }
887 888
888 } // namespace blink 889 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698