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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 return m_networkState; 707 return m_networkState;
708 } 708 }
709 709
710 String HTMLMediaElement::canPlayType(const String& mimeType) const { 710 String HTMLMediaElement::canPlayType(const String& mimeType) const {
711 MIMETypeRegistry::SupportsType support = supportsType(ContentType(mimeType)); 711 MIMETypeRegistry::SupportsType support = supportsType(ContentType(mimeType));
712 String canPlay; 712 String canPlay;
713 713
714 // 4.8.10.3 714 // 4.8.10.3
715 switch (support) { 715 switch (support) {
716 case MIMETypeRegistry::IsNotSupported: 716 case MIMETypeRegistry::IsNotSupported:
717 canPlay = emptyString(); 717 canPlay = emptyString;
718 break; 718 break;
719 case MIMETypeRegistry::MayBeSupported: 719 case MIMETypeRegistry::MayBeSupported:
720 canPlay = "maybe"; 720 canPlay = "maybe";
721 break; 721 break;
722 case MIMETypeRegistry::IsSupported: 722 case MIMETypeRegistry::IsSupported:
723 canPlay = "probably"; 723 canPlay = "probably";
724 break; 724 break;
725 } 725 }
726 726
727 BLINK_MEDIA_LOG << "canPlayType(" << (void*)this << ", " << mimeType 727 BLINK_MEDIA_LOG << "canPlayType(" << (void*)this << ", " << mimeType
(...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4128 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4128 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4129 } 4129 }
4130 4130
4131 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4131 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4132 m_mostlyFillingViewport = true; 4132 m_mostlyFillingViewport = true;
4133 if (m_webMediaPlayer) 4133 if (m_webMediaPlayer)
4134 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4134 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4135 } 4135 }
4136 4136
4137 } // namespace blink 4137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698