| OLD | NEW |
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 m_contextState(Suspended), | 100 m_contextState(Suspended), |
| 101 m_closedContextSampleRate(-1), | 101 m_closedContextSampleRate(-1), |
| 102 m_periodicWaveSine(nullptr), | 102 m_periodicWaveSine(nullptr), |
| 103 m_periodicWaveSquare(nullptr), | 103 m_periodicWaveSquare(nullptr), |
| 104 m_periodicWaveSawtooth(nullptr), | 104 m_periodicWaveSawtooth(nullptr), |
| 105 m_periodicWaveTriangle(nullptr), | 105 m_periodicWaveTriangle(nullptr), |
| 106 m_outputPosition() { | 106 m_outputPosition() { |
| 107 // If mediaPlaybackRequiresUserGesture is enabled, cross origin iframes will | 107 // If mediaPlaybackRequiresUserGesture is enabled, cross origin iframes will |
| 108 // require user gesture for the AudioContext to produce sound. | 108 // require user gesture for the AudioContext to produce sound. |
| 109 if (document->settings() && | 109 if (document->settings() && |
| 110 document->settings()->mediaPlaybackRequiresUserGesture() && | 110 document->settings()->getMediaPlaybackRequiresUserGesture() && |
| 111 document->frame() && document->frame()->isCrossOriginSubframe()) { | 111 document->frame() && document->frame()->isCrossOriginSubframe()) { |
| 112 m_autoplayStatus = AutoplayStatus::AutoplayStatusFailed; | 112 m_autoplayStatus = AutoplayStatus::AutoplayStatusFailed; |
| 113 m_userGestureRequired = true; | 113 m_userGestureRequired = true; |
| 114 } | 114 } |
| 115 | 115 |
| 116 m_destinationNode = DefaultAudioDestinationNode::create(this); | 116 m_destinationNode = DefaultAudioDestinationNode::create(this); |
| 117 | 117 |
| 118 initialize(); | 118 initialize(); |
| 119 } | 119 } |
| 120 | 120 |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 } | 892 } |
| 893 | 893 |
| 894 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { | 894 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { |
| 895 if (getExecutionContext()) | 895 if (getExecutionContext()) |
| 896 return getExecutionContext()->getSecurityOrigin(); | 896 return getExecutionContext()->getSecurityOrigin(); |
| 897 | 897 |
| 898 return nullptr; | 898 return nullptr; |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace blink | 901 } // namespace blink |
| OLD | NEW |