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

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 333813004: Oilpan: Make MediaControllers ExecutionContext a weak pointer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nullptr Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/MediaController.h » ('j') | Source/core/html/MediaController.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 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 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after
3183 m_asyncEventQueue->close(); 3183 m_asyncEventQueue->close();
3184 } 3184 }
3185 3185
3186 bool HTMLMediaElement::hasPendingActivity() const 3186 bool HTMLMediaElement::hasPendingActivity() const
3187 { 3187 {
3188 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents(); 3188 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents();
3189 } 3189 }
3190 3190
3191 void HTMLMediaElement::contextDestroyed() 3191 void HTMLMediaElement::contextDestroyed()
3192 { 3192 {
3193 // With Oilpan the ExecutionContext is weakly referenced from the media
3194 // controller and so it will clear itself on destruction.
3195 #if !ENABLE(OILPAN)
3193 if (m_mediaController) 3196 if (m_mediaController)
3194 m_mediaController->clearExecutionContext(); 3197 m_mediaController->clearExecutionContext();
3198 #endif
3195 ActiveDOMObject::contextDestroyed(); 3199 ActiveDOMObject::contextDestroyed();
3196 } 3200 }
3197 3201
3198 bool HTMLMediaElement::isFullscreen() const 3202 bool HTMLMediaElement::isFullscreen() const
3199 { 3203 {
3200 return FullscreenElementStack::isActiveFullScreenElement(this); 3204 return FullscreenElementStack::isActiveFullScreenElement(this);
3201 } 3205 }
3202 3206
3203 void HTMLMediaElement::enterFullscreen() 3207 void HTMLMediaElement::enterFullscreen()
3204 { 3208 {
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 3677
3674 #if ENABLE(WEB_AUDIO) 3678 #if ENABLE(WEB_AUDIO)
3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3679 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3676 { 3680 {
3677 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3681 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3678 audioSourceProvider()->setClient(0); 3682 audioSourceProvider()->setClient(0);
3679 } 3683 }
3680 #endif 3684 #endif
3681 3685
3682 } 3686 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/MediaController.h » ('j') | Source/core/html/MediaController.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698