OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 scheduleDispatchEvent(Event::create(EventTypeNames::inactive)); | 295 scheduleDispatchEvent(Event::create(EventTypeNames::inactive)); |
296 } | 296 } |
297 | 297 |
298 // TODO(guidou): remove firing of this event. See crbug.com/586924 | 298 // TODO(guidou): remove firing of this event. See crbug.com/586924 |
299 if (!m_descriptor->ended()) { | 299 if (!m_descriptor->ended()) { |
300 m_descriptor->setEnded(); | 300 m_descriptor->setEnded(); |
301 scheduleDispatchEvent(Event::create(EventTypeNames::ended)); | 301 scheduleDispatchEvent(Event::create(EventTypeNames::ended)); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 bool MediaStream::addEventListenerInternal(const AtomicString& eventType, EventL
istener* listener, const AddEventListenerOptions& options) | 305 bool MediaStream::addEventListenerInternal(const AtomicString& eventType, EventL
istener* listener, const AddEventListenerOptionsResolved& options) |
306 { | 306 { |
307 if (eventType == EventTypeNames::ended) | 307 if (eventType == EventTypeNames::ended) |
308 Deprecation::countDeprecation(getExecutionContext(), UseCounter::MediaSt
reamOnEnded); | 308 Deprecation::countDeprecation(getExecutionContext(), UseCounter::MediaSt
reamOnEnded); |
309 else if (eventType == EventTypeNames::active) | 309 else if (eventType == EventTypeNames::active) |
310 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnActive
); | 310 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnActive
); |
311 else if (eventType == EventTypeNames::inactive) | 311 else if (eventType == EventTypeNames::inactive) |
312 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnInacti
ve); | 312 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnInacti
ve); |
313 | 313 |
314 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen
er, options); | 314 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen
er, options); |
315 } | 315 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 ContextLifecycleObserver::trace(visitor); | 433 ContextLifecycleObserver::trace(visitor); |
434 MediaStreamDescriptorClient::trace(visitor); | 434 MediaStreamDescriptorClient::trace(visitor); |
435 } | 435 } |
436 | 436 |
437 MediaStream* toMediaStream(MediaStreamDescriptor* descriptor) | 437 MediaStream* toMediaStream(MediaStreamDescriptor* descriptor) |
438 { | 438 { |
439 return static_cast<MediaStream*>(descriptor->client()); | 439 return static_cast<MediaStream*>(descriptor->client()); |
440 } | 440 } |
441 | 441 |
442 } // namespace blink | 442 } // namespace blink |
OLD | NEW |