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

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

Issue 260583002: Remove the HTMLMediaElementControllerNotNull use counter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after
3511 setControllerInternal(controller); 3511 setControllerInternal(controller);
3512 } 3512 }
3513 3513
3514 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control ler) 3514 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control ler)
3515 { 3515 {
3516 if (m_mediaController) 3516 if (m_mediaController)
3517 m_mediaController->removeMediaElement(this); 3517 m_mediaController->removeMediaElement(this);
3518 3518
3519 m_mediaController = controller; 3519 m_mediaController = controller;
3520 3520
3521 if (m_mediaController) { 3521 if (m_mediaController)
3522 UseCounter::count(document(), UseCounter::HTMLMediaElementControllerNotN ull);
3523 m_mediaController->addMediaElement(this); 3522 m_mediaController->addMediaElement(this);
3524 }
3525 } 3523 }
3526 3524
3527 void HTMLMediaElement::updateMediaController() 3525 void HTMLMediaElement::updateMediaController()
3528 { 3526 {
3529 if (m_mediaController) 3527 if (m_mediaController)
3530 m_mediaController->reportControllerState(); 3528 m_mediaController->reportControllerState();
3531 } 3529 }
3532 3530
3533 bool HTMLMediaElement::isBlocked() const 3531 bool HTMLMediaElement::isBlocked() const
3534 { 3532 {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
3634 3632
3635 void HTMLMediaElement::trace(Visitor* visitor) 3633 void HTMLMediaElement::trace(Visitor* visitor)
3636 { 3634 {
3637 visitor->trace(m_textTracks); 3635 visitor->trace(m_textTracks);
3638 visitor->trace(m_textTracksWhenResourceSelectionBegan); 3636 visitor->trace(m_textTracksWhenResourceSelectionBegan);
3639 Supplementable<HTMLMediaElement>::trace(visitor); 3637 Supplementable<HTMLMediaElement>::trace(visitor);
3640 HTMLElement::trace(visitor); 3638 HTMLElement::trace(visitor);
3641 } 3639 }
3642 3640
3643 } 3641 }
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