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

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

Issue 28903009: Add UseCounters for webkitAudioDecodedByteCount/webkitVideoDecodedByteCount (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | Source/core/page/UseCounter.h » ('j') | 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 3529 matching lines...) Expand 10 before | Expand all | Expand 10 after
3540 m_processingPreferenceChange = true; 3540 m_processingPreferenceChange = true;
3541 markCaptionAndSubtitleTracksAsUnconfigured(); 3541 markCaptionAndSubtitleTracksAsUnconfigured();
3542 m_processingPreferenceChange = false; 3542 m_processingPreferenceChange = false;
3543 3543
3544 updateTextTrackDisplay(); 3544 updateTextTrackDisplay();
3545 } 3545 }
3546 } 3546 }
3547 3547
3548 unsigned HTMLMediaElement::webkitAudioDecodedByteCount() const 3548 unsigned HTMLMediaElement::webkitAudioDecodedByteCount() const
3549 { 3549 {
3550 UseCounter::count(document(), UseCounter::PrefixedAudioDecodedByteCount);
3550 if (!m_player) 3551 if (!m_player)
3551 return 0; 3552 return 0;
3552 return m_player->audioDecodedByteCount(); 3553 return m_player->audioDecodedByteCount();
3553 } 3554 }
3554 3555
3555 unsigned HTMLMediaElement::webkitVideoDecodedByteCount() const 3556 unsigned HTMLMediaElement::webkitVideoDecodedByteCount() const
3556 { 3557 {
3558 UseCounter::count(document(), UseCounter::PrefixedVideoDecodedByteCount);
3557 if (!m_player) 3559 if (!m_player)
3558 return 0; 3560 return 0;
3559 return m_player->videoDecodedByteCount(); 3561 return m_player->videoDecodedByteCount();
3560 } 3562 }
3561 3563
3562 bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const 3564 bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const
3563 { 3565 {
3564 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ; 3566 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ;
3565 } 3567 }
3566 3568
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3886 { 3888 {
3887 scheduleLayerUpdate(); 3889 scheduleLayerUpdate();
3888 } 3890 }
3889 3891
3890 bool HTMLMediaElement::isInteractiveContent() const 3892 bool HTMLMediaElement::isInteractiveContent() const
3891 { 3893 {
3892 return fastHasAttribute(controlsAttr); 3894 return fastHasAttribute(controlsAttr);
3893 } 3895 }
3894 3896
3895 } 3897 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698