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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 UNSCHEDULED_STATE = 0, | 51 UNSCHEDULED_STATE = 0, |
| 52 SCHEDULED_STATE = 1, | 52 SCHEDULED_STATE = 1, |
| 53 PLAYING_STATE = 2, | 53 PLAYING_STATE = 2, |
| 54 FINISHED_STATE = 3 | 54 FINISHED_STATE = 3 |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // This helper class handles the lifetime of an AudioScheduledSourceNode wit h an onended event | 57 // This helper class handles the lifetime of an AudioScheduledSourceNode wit h an onended event |
| 58 // listener. This keeps the node alive until the event listener is processed . | 58 // listener. This keeps the node alive until the event listener is processed . |
| 59 class NotifyEndedTask { | 59 class NotifyEndedTask { |
| 60 public: | 60 public: |
| 61 NotifyEndedTask(PassRefPtr<AudioScheduledSourceNode> scheduledNode); | 61 NotifyEndedTask(PassRefPtrWillBeRawPtr<AudioScheduledSourceNode> schedul edNode); |
| 62 void notifyEnded(); | 62 void notifyEnded(); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 RefPtr<AudioScheduledSourceNode> m_scheduledNode; | 65 RefPtrWillBeRawPtr<AudioScheduledSourceNode> m_scheduledNode; |
|
Mads Ager (chromium)
2014/03/27 11:06:49
I'm not entirely sure, but it looks like this obje
haraken
2014/03/27 11:44:05
Shouldn't this be RefPtrWillBePersistent ? Otherwi
keishi
2014/04/03 06:53:19
yes, this is created on the render thread and pass
| |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 AudioScheduledSourceNode(AudioContext*, float sampleRate); | 68 AudioScheduledSourceNode(AudioContext*, float sampleRate); |
| 69 | 69 |
| 70 // Scheduling. | 70 // Scheduling. |
| 71 void start(ExceptionState& exceptionState) { start(0.0, exceptionState); } | 71 void start(ExceptionState& exceptionState) { start(0.0, exceptionState); } |
| 72 void start(double when, ExceptionState&); | 72 void start(double when, ExceptionState&); |
| 73 void stop(ExceptionState& exceptionState) { stop(0.0, exceptionState); } | 73 void stop(ExceptionState& exceptionState) { stop(0.0, exceptionState); } |
| 74 void stop(double when, ExceptionState&); | 74 void stop(double when, ExceptionState&); |
| 75 | 75 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 double m_endTime; // in seconds | 109 double m_endTime; // in seconds |
| 110 | 110 |
| 111 bool m_hasEndedListener; | 111 bool m_hasEndedListener; |
| 112 | 112 |
| 113 static const double UnknownTime; | 113 static const double UnknownTime; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace WebCore | 116 } // namespace WebCore |
| 117 | 117 |
| 118 #endif // AudioScheduledSourceNode_h | 118 #endif // AudioScheduledSourceNode_h |
| OLD | NEW |