Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 WebContentDecryptionModule* MediaKeys::contentDecryptionModule() { 288 WebContentDecryptionModule* MediaKeys::contentDecryptionModule() {
289 return m_cdm.get(); 289 return m_cdm.get();
290 } 290 }
291 291
292 DEFINE_TRACE(MediaKeys) { 292 DEFINE_TRACE(MediaKeys) {
293 visitor->trace(m_pendingActions); 293 visitor->trace(m_pendingActions);
294 visitor->trace(m_mediaElement); 294 visitor->trace(m_mediaElement);
295 ContextLifecycleObserver::trace(visitor); 295 ContextLifecycleObserver::trace(visitor);
296 } 296 }
297 297
298 void MediaKeys::contextDestroyed() { 298 void MediaKeys::contextDestroyed(ExecutionContext*) {
299 m_timer.stop(); 299 m_timer.stop();
300 m_pendingActions.clear(); 300 m_pendingActions.clear();
301 301
302 // We don't need the CDM anymore. Only destroyed after all related 302 // We don't need the CDM anymore. Only destroyed after all related
303 // ContextLifecycleObservers have been stopped. 303 // ContextLifecycleObservers have been stopped.
304 m_cdm.reset(); 304 m_cdm.reset();
305 } 305 }
306 306
307 bool MediaKeys::hasPendingActivity() const { 307 bool MediaKeys::hasPendingActivity() const {
308 // Remain around if there are pending events. 308 // Remain around if there are pending events.
309 DVLOG(MEDIA_KEYS_LOG_LEVEL) 309 DVLOG(MEDIA_KEYS_LOG_LEVEL)
310 << __func__ << "(" << this << ")" 310 << __func__ << "(" << this << ")"
311 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") 311 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "")
312 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); 312 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : "");
313 313
314 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; 314 return !m_pendingActions.isEmpty() || m_reservedForMediaElement;
315 } 315 }
316 316
317 } // namespace blink 317 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698