| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 AddEventListenerOptions& 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) |
| 310 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnActive
); |
| 311 else if (eventType == EventTypeNames::inactive) |
| 312 UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnInacti
ve); |
| 309 | 313 |
| 310 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen
er, options); | 314 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen
er, options); |
| 311 } | 315 } |
| 312 | 316 |
| 313 void MediaStream::contextDestroyed() | 317 void MediaStream::contextDestroyed() |
| 314 { | 318 { |
| 315 ContextLifecycleObserver::contextDestroyed(); | 319 ContextLifecycleObserver::contextDestroyed(); |
| 316 m_stopped = true; | 320 m_stopped = true; |
| 317 } | 321 } |
| 318 | 322 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 ContextLifecycleObserver::trace(visitor); | 433 ContextLifecycleObserver::trace(visitor); |
| 430 MediaStreamDescriptorClient::trace(visitor); | 434 MediaStreamDescriptorClient::trace(visitor); |
| 431 } | 435 } |
| 432 | 436 |
| 433 MediaStream* toMediaStream(MediaStreamDescriptor* descriptor) | 437 MediaStream* toMediaStream(MediaStreamDescriptor* descriptor) |
| 434 { | 438 { |
| 435 return static_cast<MediaStream*>(descriptor->client()); | 439 return static_cast<MediaStream*>(descriptor->client()); |
| 436 } | 440 } |
| 437 | 441 |
| 438 } // namespace blink | 442 } // namespace blink |
| OLD | NEW |