Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 finish(); | 125 finish(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 return; | 128 return; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void AudioScheduledSourceHandler::start(double when, ExceptionState& exceptionSt ate) | 131 void AudioScheduledSourceHandler::start(double when, ExceptionState& exceptionSt ate) |
| 132 { | 132 { |
| 133 ASSERT(isMainThread()); | 133 ASSERT(isMainThread()); |
| 134 | 134 |
| 135 context()->recordUserGestureState(); | |
|
Raymond Toy
2016/06/06 15:10:08
Should put this after all of the code that could t
mlamouri (slow - plz ping)
2016/06/06 16:14:13
ditto
| |
| 136 | |
| 135 if (playbackState() != UNSCHEDULED_STATE) { | 137 if (playbackState() != UNSCHEDULED_STATE) { |
| 136 exceptionState.throwDOMException( | 138 exceptionState.throwDOMException( |
| 137 InvalidStateError, | 139 InvalidStateError, |
| 138 "cannot call start more than once."); | 140 "cannot call start more than once."); |
| 139 return; | 141 return; |
| 140 } | 142 } |
| 141 | 143 |
| 142 if (when < 0) { | 144 if (when < 0) { |
| 143 exceptionState.throwDOMException( | 145 exceptionState.throwDOMException( |
| 144 InvalidAccessError, | 146 InvalidAccessError, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 // playback state if the context is closed. | 272 // playback state if the context is closed. |
| 271 if (context()->isContextClosed()) | 273 if (context()->isContextClosed()) |
| 272 return false; | 274 return false; |
| 273 | 275 |
| 274 // If a node is scheduled or playing, do not collect the node prematurely | 276 // If a node is scheduled or playing, do not collect the node prematurely |
| 275 // even its reference is out of scope. Then fire onended event if assigned. | 277 // even its reference is out of scope. Then fire onended event if assigned. |
| 276 return audioScheduledSourceHandler().isPlayingOrScheduled(); | 278 return audioScheduledSourceHandler().isPlayingOrScheduled(); |
| 277 } | 279 } |
| 278 | 280 |
| 279 } // namespace blink | 281 } // namespace blink |
| 280 | |
| OLD | NEW |