Index: third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
index dfb698dacd38e11963dcac100fb43ce12cac9db6..d95f266508c92712fddf7745ee4752c9a00bf225 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
@@ -33,6 +33,7 @@ |
#include "core/html/PluginDocument.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/layout/LayoutPart.h" |
+#include "core/loader/FrameLoaderClient.h" |
namespace blink { |
@@ -146,6 +147,14 @@ void HTMLEmbedElement::updateWidgetInternal() |
if (!layoutObject()) |
return; |
+ // Overwrites the URL and MIME type of a YouTube Flash embed to use an |
+ // HTML5 video player when possible. |
+ bool overriden = false; |
+ overriden = document().frame()->loader().client()->overrideEmbedInfo(&m_url); |
+ if (overriden) { |
+ m_serviceType = "text/html"; |
+ } |
+ |
requestObject(m_url, m_serviceType, paramNames, paramValues); |
} |