| OLD | NEW |
| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "core/html/track/VideoTrackList.h" | 59 #include "core/html/track/VideoTrackList.h" |
| 60 #include "core/inspector/ConsoleMessage.h" | 60 #include "core/inspector/ConsoleMessage.h" |
| 61 #include "core/layout/LayoutVideo.h" | 61 #include "core/layout/LayoutVideo.h" |
| 62 #include "core/layout/LayoutView.h" | 62 #include "core/layout/LayoutView.h" |
| 63 #include "core/layout/compositing/PaintLayerCompositor.h" | 63 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 64 #include "core/loader/FrameLoader.h" | 64 #include "core/loader/FrameLoader.h" |
| 65 #include "core/loader/FrameLoaderClient.h" | 65 #include "core/loader/FrameLoaderClient.h" |
| 66 #include "core/page/ChromeClient.h" | 66 #include "core/page/ChromeClient.h" |
| 67 #include "core/page/NetworkStateNotifier.h" | 67 #include "core/page/NetworkStateNotifier.h" |
| 68 #include "platform/ContentType.h" | 68 #include "platform/ContentType.h" |
| 69 #include "platform/Histogram.h" |
| 69 #include "platform/Logging.h" | 70 #include "platform/Logging.h" |
| 70 #include "platform/MIMETypeFromURL.h" | 71 #include "platform/MIMETypeFromURL.h" |
| 71 #include "platform/MIMETypeRegistry.h" | 72 #include "platform/MIMETypeRegistry.h" |
| 72 #include "platform/RuntimeEnabledFeatures.h" | 73 #include "platform/RuntimeEnabledFeatures.h" |
| 73 #include "platform/UserGestureIndicator.h" | 74 #include "platform/UserGestureIndicator.h" |
| 74 #include "platform/audio/AudioBus.h" | 75 #include "platform/audio/AudioBus.h" |
| 75 #include "platform/audio/AudioSourceProviderClient.h" | 76 #include "platform/audio/AudioSourceProviderClient.h" |
| 76 #include "platform/graphics/GraphicsLayer.h" | 77 #include "platform/graphics/GraphicsLayer.h" |
| 77 #include "platform/weborigin/SecurityOrigin.h" | 78 #include "platform/weborigin/SecurityOrigin.h" |
| 78 #include "public/platform/Platform.h" | 79 #include "public/platform/Platform.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 if (contentMIMEType != "application/octet-stream" || contentTypeCodecs.isEmp
ty()) { | 235 if (contentMIMEType != "application/octet-stream" || contentTypeCodecs.isEmp
ty()) { |
| 235 WebMimeRegistry::SupportsType supported = Platform::current()->mimeRegis
try()->supportsMediaMIMEType(contentMIMEType, contentTypeCodecs, keySystem.lower
()); | 236 WebMimeRegistry::SupportsType supported = Platform::current()->mimeRegis
try()->supportsMediaMIMEType(contentMIMEType, contentTypeCodecs, keySystem.lower
()); |
| 236 return supported > WebMimeRegistry::IsNotSupported; | 237 return supported > WebMimeRegistry::IsNotSupported; |
| 237 } | 238 } |
| 238 | 239 |
| 239 return false; | 240 return false; |
| 240 } | 241 } |
| 241 | 242 |
| 242 void HTMLMediaElement::recordAutoplayMetric(AutoplayMetrics metric) | 243 void HTMLMediaElement::recordAutoplayMetric(AutoplayMetrics metric) |
| 243 { | 244 { |
| 244 Platform::current()->histogramEnumeration("Blink.MediaElement.Autoplay", met
ric, NumberOfAutoplayMetrics); | 245 DEFINE_STATIC_LOCAL(EnumerationHistogram, autoplayHistogram, ("Blink.MediaEl
ement.Autoplay", NumberOfAutoplayMetrics)); |
| 246 autoplayHistogram.count(metric); |
| 245 } | 247 } |
| 246 | 248 |
| 247 WebMimeRegistry::SupportsType HTMLMediaElement::supportsType(const ContentType&
contentType, const String& keySystem) | 249 WebMimeRegistry::SupportsType HTMLMediaElement::supportsType(const ContentType&
contentType, const String& keySystem) |
| 248 { | 250 { |
| 249 DEFINE_STATIC_LOCAL(const String, codecs, ("codecs")); | 251 DEFINE_STATIC_LOCAL(const String, codecs, ("codecs")); |
| 250 | 252 |
| 251 if (!RuntimeEnabledFeatures::mediaEnabled()) | 253 if (!RuntimeEnabledFeatures::mediaEnabled()) |
| 252 return WebMimeRegistry::IsNotSupported; | 254 return WebMimeRegistry::IsNotSupported; |
| 253 | 255 |
| 254 String type = contentType.type().lower(); | 256 String type = contentType.type().lower(); |
| (...skipping 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3624 { | 3626 { |
| 3625 visitor->trace(m_client); | 3627 visitor->trace(m_client); |
| 3626 } | 3628 } |
| 3627 | 3629 |
| 3628 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3630 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
| 3629 { | 3631 { |
| 3630 visitor->trace(m_client); | 3632 visitor->trace(m_client); |
| 3631 } | 3633 } |
| 3632 | 3634 |
| 3633 } // namespace blink | 3635 } // namespace blink |
| OLD | NEW |