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

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

Issue 156493002: Add a UseCounter for HTMLMediaElement.controller (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 10 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 | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »
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 3823 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 setControllerInternal(controller); 3834 setControllerInternal(controller);
3835 } 3835 }
3836 3836
3837 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control ler) 3837 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control ler)
3838 { 3838 {
3839 if (m_mediaController) 3839 if (m_mediaController)
3840 m_mediaController->removeMediaElement(this); 3840 m_mediaController->removeMediaElement(this);
3841 3841
3842 m_mediaController = controller; 3842 m_mediaController = controller;
3843 3843
3844 if (m_mediaController) 3844 if (m_mediaController) {
3845 UseCounter::count(document(), UseCounter::HTMLMediaElementControllerNotN ull);
3845 m_mediaController->addMediaElement(this); 3846 m_mediaController->addMediaElement(this);
3847 }
3846 3848
3847 if (hasMediaControls()) 3849 if (hasMediaControls())
3848 mediaControls()->setMediaController(m_mediaController ? m_mediaControlle r.get() : static_cast<MediaControllerInterface*>(this)); 3850 mediaControls()->setMediaController(m_mediaController ? m_mediaControlle r.get() : static_cast<MediaControllerInterface*>(this));
3849 } 3851 }
3850 3852
3851 void HTMLMediaElement::updateMediaController() 3853 void HTMLMediaElement::updateMediaController()
3852 { 3854 {
3853 if (m_mediaController) 3855 if (m_mediaController)
3854 m_mediaController->reportControllerState(); 3856 m_mediaController->reportControllerState();
3855 } 3857 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 { 3964 {
3963 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3965 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3964 } 3966 }
3965 3967
3966 bool HTMLMediaElement::isInteractiveContent() const 3968 bool HTMLMediaElement::isInteractiveContent() const
3967 { 3969 {
3968 return fastHasAttribute(controlsAttr); 3970 return fastHasAttribute(controlsAttr);
3969 } 3971 }
3970 3972
3971 } 3973 }
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698