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

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

Issue 135003003: Add a UseCounter for the HTMLMediaElement.canPlayType keySystem argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase!! Created 6 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 | 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 setAttribute(srcAttr, url); 578 setAttribute(srcAttr, url);
579 } 579 }
580 580
581 HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const 581 HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const
582 { 582 {
583 return m_networkState; 583 return m_networkState;
584 } 584 }
585 585
586 String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySy stem) const 586 String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySy stem) const
587 { 587 {
588 if (!keySystem.isNull())
589 UseCounter::count(document(), UseCounter::CanPlayTypeKeySystem);
590
588 WebMimeRegistry::SupportsType support = supportsType(ContentType(mimeType), keySystem); 591 WebMimeRegistry::SupportsType support = supportsType(ContentType(mimeType), keySystem);
589 String canPlay; 592 String canPlay;
590 593
591 // 4.8.10.3 594 // 4.8.10.3
592 switch (support) 595 switch (support)
593 { 596 {
594 case WebMimeRegistry::IsNotSupported: 597 case WebMimeRegistry::IsNotSupported:
595 canPlay = emptyString(); 598 canPlay = emptyString();
596 break; 599 break;
597 case WebMimeRegistry::MayBeSupported: 600 case WebMimeRegistry::MayBeSupported:
(...skipping 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after
3923 { 3926 {
3924 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3927 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3925 } 3928 }
3926 3929
3927 bool HTMLMediaElement::isInteractiveContent() const 3930 bool HTMLMediaElement::isInteractiveContent() const
3928 { 3931 {
3929 return fastHasAttribute(controlsAttr); 3932 return fastHasAttribute(controlsAttr);
3930 } 3933 }
3931 3934
3932 } 3935 }
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