<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185179] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185179">185179</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-06-03 16:41:52 -0700 (Wed, 03 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add basic Media Session support to HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=145581

Patch by Matt Rajca &lt;mrajca@apple.com&gt; on 2015-06-03
Reviewed by Eric Carlson.

HTMLMediaElements now have:

- a 'kind' attribute representing the intrinsic media category
- a 'session' attribute representing the current media session, if any

* CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
* DerivedSources.make: Include the new IDL file.
* Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
(WebCore::HTMLMediaElementMediaSession::session):
* Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
(WebCore::HTMLMediaElementMediaSession::kind):
(WebCore::HTMLMediaElementMediaSession::setKind):
(WebCore::HTMLMediaElementMediaSession::setSession):
* Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
* PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
* WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
* html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
(WebCore::HTMLMediaElement::kind):
(WebCore::HTMLMediaElement::setKind):
(WebCore::HTMLMediaElement::session):
(WebCore::HTMLMediaElement::setSession):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCoreIncludeCommonprops">trunk/Source/WebCore/WebCore.vcxproj/WebCoreIncludeCommon.props</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessioncpp">trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessionh">trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessionidl">trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -9,6 +9,7 @@
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/indexeddb&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/indieui&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediacontrols/&quot;
</span><ins>+    &quot;${WEBCORE_DIR}/Modules/mediasession&quot;
</ins><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediasource&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediastream&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/navigatorcontentutils&quot;
</span><span class="lines">@@ -218,6 +219,7 @@
</span><span class="cx"> 
</span><span class="cx">     Modules/mediacontrols/MediaControlsHost.idl
</span><span class="cx"> 
</span><ins>+    Modules/mediasession/HTMLMediaElementMediaSession.idl
</ins><span class="cx">     Modules/mediasession/MediaRemoteControls.idl
</span><span class="cx">     Modules/mediasession/MediaSession.idl
</span><span class="cx"> 
</span><span class="lines">@@ -874,6 +876,7 @@
</span><span class="cx"> 
</span><span class="cx">     Modules/mediacontrols/MediaControlsHost.cpp
</span><span class="cx"> 
</span><ins>+    Modules/mediasession/HTMLMediaElementMediaSession.cpp
</ins><span class="cx">     Modules/mediasession/MediaRemoteControls.cpp
</span><span class="cx">     Modules/mediasession/MediaSession.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/ChangeLog        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-06-03  Matt Rajca  &lt;mrajca@apple.com&gt;
+
+        Add basic Media Session support to HTMLMediaElement.
+        https://bugs.webkit.org/show_bug.cgi?id=145581
+
+        Reviewed by Eric Carlson.
+
+        HTMLMediaElements now have:
+
+        - a 'kind' attribute representing the intrinsic media category
+        - a 'session' attribute representing the current media session, if any
+
+        * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
+        * DerivedSources.make: Include the new IDL file.
+        * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
+        (WebCore::HTMLMediaElementMediaSession::session):
+        * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
+        (WebCore::HTMLMediaElementMediaSession::kind):
+        (WebCore::HTMLMediaElementMediaSession::setKind):
+        (WebCore::HTMLMediaElementMediaSession::setSession):
+        * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
+        * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
+        * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
+        * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
+        (WebCore::HTMLMediaElement::kind):
+        (WebCore::HTMLMediaElement::setKind):
+        (WebCore::HTMLMediaElement::session):
+        (WebCore::HTMLMediaElement::setSession):
+
</ins><span class="cx"> 2015-06-03  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Cleanup after r185175.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/DerivedSources.make        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx">     $(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \
</span><span class="cx">     $(WebCore)/Modules/indieui/UIRequestEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
</span><ins>+    $(WebCore)/Modules/mediasession/HTMLMediaElementMediaSession.idl \
</ins><span class="cx">     $(WebCore)/Modules/mediasession/MediaRemoteControls.idl \
</span><span class="cx">     $(WebCore)/Modules/mediasession/MediaSession.idl \
</span><span class="cx">         $(WebCore)/Modules/mediasource/DOMURLMediaSource.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessioncpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.cpp (0 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.cpp        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;HTMLMediaElementMediaSession.h&quot;
+
+#if ENABLE(MEDIA_SESSION) &amp;&amp; ENABLE(VIDEO)
+
+namespace WebCore {
+
+const String&amp; HTMLMediaElementMediaSession::kind(HTMLMediaElement* element)
+{
+    ASSERT(element);
+    return element-&gt;kind();
+}
+
+void HTMLMediaElementMediaSession::setKind(WebCore::HTMLMediaElement* element, const String&amp; kind)
+{
+    ASSERT(element);
+    return element-&gt;setKind(kind);
+}
+
+MediaSession* HTMLMediaElementMediaSession::session(HTMLMediaElement* element, bool&amp; isNull)
+{
+    ASSERT(element);
+    MediaSession* session = element-&gt;session();
+    isNull = !session;
+    return session;
+}
+
+void HTMLMediaElementMediaSession::setSession(HTMLMediaElement* element, MediaSession* session)
+{
+    ASSERT(element);
+    element-&gt;setSession(session);
+}
+
+} // namespace WebCore
+
+#endif /* ENABLE(MEDIA_SESSION) &amp;&amp; ENABLE(VIDEO) */
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.h (0 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.h        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLMediaElementMediaSession_h
+#define HTMLMediaElementMediaSession_h
+
+#if ENABLE(MEDIA_SESSION) &amp;&amp; ENABLE(VIDEO)
+
+#include &quot;HTMLMediaElement.h&quot;
+
+namespace WebCore {
+
+class HTMLMediaElementMediaSession {
+public:
+    static const String&amp; kind(HTMLMediaElement*);
+    static void setKind(HTMLMediaElement*, const String&amp;);
+
+    static MediaSession* session(HTMLMediaElement*, bool&amp;);
+    static void setSession(HTMLMediaElement*, MediaSession*);
+};
+
+} // namespace WebCore
+
+#endif /* ENABLE(MEDIA_SESSION) &amp;&amp; ENABLE(VIDEO) */
+
+#endif /* HTMLMediaElementMediaSession_h */
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionHTMLMediaElementMediaSessionidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.idl (0 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.idl        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=VIDEO&amp;MEDIA_SESSION,
+] partial interface HTMLMediaElement {
+    attribute DOMString kind;
+
+#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
+    attribute MediaSession? session;
+#endif
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/PlatformMac.cmake        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -570,6 +570,7 @@
</span><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHistory.mm
</span><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLFormControlsCollection.mm
</span><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElement.mm
</span><ins>+    ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElementMediaSession.mm
</ins><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElementMediaStream.mm
</span><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLTrackElement.mm
</span><span class="cx">     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLVideoElement.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreIncludeCommonprops"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreIncludeCommon.props (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreIncludeCommon.props        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreIncludeCommon.props        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">   &lt;/PropertyGroup&gt;
</span><span class="cx">   &lt;ItemDefinitionGroup&gt;
</span><span class="cx">     &lt;ClCompile&gt;
</span><del>-      &lt;AdditionalIncludeDirectories&gt;$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\encryptedmedia;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\gamepad;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\plugins;$(ProjectDir)..\Modules\speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\streams;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\cssjit;$(ProjectDir)..\contentextensions;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\rendering;$(ProjectDir)..\rendering\lin
 e;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\audio;$(ProjectDir)..\platform\mock;$(ProjectDir)..\platform\sql;$(ProjectDir)..
 \platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\icu;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\replay;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectDir)..\crypto\keys;$(ProjectDir)..\wm
 l;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;
</del><ins>+      &lt;AdditionalIncludeDirectories&gt;$(ProjectDir)..;$(ProjectDir)..\Modules\mediacontrols;$(ProjectDir)..\Modules\mediasession;$(ProjectDir)..\Modules\mediastream;$(ProjectDir)..\Modules\encryptedmedia;$(ProjectDir)..\Modules\filesystem;$(ProjectDir)..\Modules\gamepad;$(ProjectDir)..\Modules\geolocation;$(ProjectDir)..\Modules\indexeddb;$(ProjectDir)..\Modules\mediasource;$(ProjectDir)..\Modules\navigatorcontentutils;$(ProjectDir)..\Modules\plugins;$(ProjectDir)..\Modules\speech;$(ProjectDir)..\Modules\proximity;$(ProjectDir)..\Modules\quota;$(ProjectDir)..\Modules\notifications;$(ProjectDir)..\Modules\streams;$(ProjectDir)..\Modules\webdatabase;$(ProjectDir)..\Modules\websockets;$(ProjectDir)..\accessibility;$(ProjectDir)..\accessibility\win;$(ProjectDir)..\bridge;$(ProjectDir)..\bridge\c;$(ProjectDir)..\bridge\jsc;$(ProjectDir)..\css;$(ProjectDir)..\cssjit;$(ProjectDir)..\contentextensions;$(ProjectDir)..\editing;$(ProjectDir)..\fileapi;$(ProjectDir)..\ren
 dering;$(ProjectDir)..\rendering\line;$(ProjectDir)..\rendering\mathml;$(ProjectDir)..\rendering\shapes;$(ProjectDir)..\rendering\style;$(ProjectDir)..\rendering\svg;$(ProjectDir)..\bindings;$(ProjectDir)..\bindings\generic;$(ProjectDir)..\bindings\js;$(ProjectDir)..\bindings\js\specialization;$(ProjectDir)..\dom;$(ProjectDir)..\dom\default;$(ProjectDir)..\history;$(ProjectDir)..\html;$(ProjectDir)..\html\canvas;$(ProjectDir)..\html\forms;$(ProjectDir)..\html\parser;$(ProjectDir)..\html\shadow;$(ProjectDir)..\html\track;$(ProjectDir)..\inspector;$(ProjectDir)..\loader;$(ProjectDir)..\loader\appcache;$(ProjectDir)..\loader\archive;$(ProjectDir)..\loader\archive\cf;$(ProjectDir)..\loader\cache;$(ProjectDir)..\loader\icon;$(ProjectDir)..\mathml;$(ProjectDir)..\page;$(ProjectDir)..\page\animation;$(ProjectDir)..\page\scrolling;$(ProjectDir)..\page\win;$(ProjectDir)..\platform;$(ProjectDir)..\platform\animation;$(ProjectDir)..\platform\audio;$(ProjectDir)..\platform\mock;$(Projec
 tDir)..\platform\sql;$(ProjectDir)..\platform\win;$(ProjectDir)..\platform\network;$(ProjectDir)..\platform\network\win;$(ProjectDir)..\platform\cf;$(ProjectDir)..\platform\graphics;$(ProjectDir)..\platform\graphics\ca;$(ProjectDir)..\platform\graphics\cpu\arm\filters;$(ProjectDir)..\platform\graphics\filters;$(ProjectDir)..\platform\graphics\filters\arm;$(ProjectDir)..\platform\graphics\opentype;$(ProjectDir)..\platform\graphics\transforms;$(ProjectDir)..\platform\text;$(ProjectDir)..\platform\text\icu;$(ProjectDir)..\platform\text\transcoder;$(ProjectDir)..\platform\graphics\win;$(ProjectDir)..\xml;$(ProjectDir)..\xml\parser;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources;$(ProjectDir)..\plugins;$(ProjectDir)..\plugins\win;$(ProjectDir)..\replay;$(ProjectDir)..\svg\animation;$(ProjectDir)..\svg\graphics;$(ProjectDir)..\svg\properties;$(ProjectDir)..\svg\graphics\filters;$(ProjectDir)..\svg;$(ProjectDir)..\testing;$(ProjectDir)..\crypto;$(ProjectD
 ir)..\crypto\keys;$(ProjectDir)..\wml;$(ProjectDir)..\storage;$(ProjectDir)..\style;$(ProjectDir)..\websockets;$(ProjectDir)..\workers;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ProjectDir)..\ForwardingHeaders;$(ProjectDir)..\platform\graphics\gpu;$(ProjectDir)..\platform\graphics\egl;$(ProjectDir)..\platform\graphics\surfaces;$(ProjectDir)..\platform\graphics\surfaces\egl;$(ProjectDir)..\platform\graphics\opengl;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;$(WebKit_Libraries)\include\private\JavaScriptCore;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\JavaScriptCore;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;
</ins><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">   &lt;/ItemDefinitionGroup&gt;
</span><span class="cx"> &lt;/Project&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -5695,6 +5695,8 @@
</span><span class="cx">                 C9027F421B1D0AD200BFBFEF /* MediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C9027F401B1D0AD200BFBFEF /* MediaSession.h */; };
</span><span class="cx">                 C90843CF1B18E47D00B68564 /* MediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */; };
</span><span class="cx">                 C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */ = {isa = PBXBuildFile; fileRef = C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */; };
</span><ins>+                C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */; };
+                C968B2E81B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */; };
</ins><span class="cx">                 C9DADBCB1B1D3B97001F17D8 /* JSMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */; };
</span><span class="cx">                 CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; };
</span><span class="cx">                 CA3BF67E10D99BAE00E6CE53 /* ScrollAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = CA3BF67D10D99BAE00E6CE53 /* ScrollAnimator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -13261,6 +13263,9 @@
</span><span class="cx">                 C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRemoteControls.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRemoteControls.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRemoteControls.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                C968B2E51B1E704500EF1F81 /* HTMLMediaElementMediaSession.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLMediaElementMediaSession.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementMediaSession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMediaElementMediaSession.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaSession.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C9DADBCA1B1D3B25001F17D8 /* JSMediaSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaSession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14606,6 +14611,9 @@
</span><span class="cx">                 0709D78B1AE5552E004E42F8 /* mediasession */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */,
+                                C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */,
+                                C968B2E51B1E704500EF1F81 /* HTMLMediaElementMediaSession.idl */,
</ins><span class="cx">                                 C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */,
</span><span class="cx">                                 C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */,
</span><span class="cx">                                 C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */,
</span><span class="lines">@@ -24936,6 +24944,7 @@
</span><span class="cx">                                 A8EA7CAB0A192B9C00A8EF5F /* HTMLMarqueeElement.h in Headers */,
</span><span class="cx">                                 E44613A50CD6331000FADA75 /* HTMLMediaElement.h in Headers */,
</span><span class="cx">                                 CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */,
</span><ins>+                                C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */,
</ins><span class="cx">                                 0779BF0E18453168000B6AE7 /* HTMLMediaElementMediaStream.h in Headers */,
</span><span class="cx">                                 A8EA79F40A1916DF00A8EF5F /* HTMLMenuElement.h in Headers */,
</span><span class="cx">                                 2BE8E2C712A589EC00FAD550 /* HTMLMetaCharsetParser.h in Headers */,
</span><span class="lines">@@ -28449,6 +28458,7 @@
</span><span class="cx">                                 A8EA7D320A19385500A8EF5F /* HTMLMapElement.cpp in Sources */,
</span><span class="cx">                                 A8EA7CAC0A192B9C00A8EF5F /* HTMLMarqueeElement.cpp in Sources */,
</span><span class="cx">                                 E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */,
</span><ins>+                                C968B2E81B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp in Sources */,
</ins><span class="cx">                                 0779BF0D18453168000B6AE7 /* HTMLMediaElementMediaStream.cpp in Sources */,
</span><span class="cx">                                 A8EA79F80A1916DF00A8EF5F /* HTMLMenuElement.cpp in Sources */,
</span><span class="cx">                                 2BE8E2C912A58A0100FAD550 /* HTMLMetaCharsetParser.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -114,6 +114,10 @@
</span><span class="cx"> #include &quot;WebKitPlaybackTargetAvailabilityEvent.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SESSION)
+#include &quot;MediaSession.h&quot;
+#endif
+
</ins><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;MediaSource.h&quot;
</span><span class="lines">@@ -6354,6 +6358,20 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SESSION)
+
+MediaSession* HTMLMediaElement::session() const
+{
+    return m_session.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLMediaElement::setSession(MediaSession* session)
+{
+    m_session = session;
+}
+
</ins><span class="cx"> #endif
</span><ins>+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (185178 => 185179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2015-06-03 23:35:24 UTC (rev 185178)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2015-06-03 23:41:52 UTC (rev 185179)
</span><span class="lines">@@ -72,6 +72,9 @@
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> class MediaKeys;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(MEDIA_SESSION)
+class MediaSession;
+#endif
</ins><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> class MediaSource;
</span><span class="cx"> class SourceBuffer;
</span><span class="lines">@@ -411,6 +414,14 @@
</span><span class="cx">     void mediaLoadingFailed(MediaPlayerEnums::NetworkState);
</span><span class="cx">     void mediaLoadingFailedFatally(MediaPlayerEnums::NetworkState);
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SESSION)
+    const String&amp; kind() const { return m_kind; }
+    void setKind(const String&amp; kind) { m_kind = kind; }
+
+    MediaSession* session() const;
+    void setSession(MediaSession*);
+#endif
+
</ins><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx">     RefPtr&lt;VideoPlaybackQuality&gt; getVideoPlaybackQuality();
</span><span class="cx"> #endif
</span><span class="lines">@@ -789,6 +800,11 @@
</span><span class="cx">     // calling the media engine recursively.
</span><span class="cx">     int m_processingMediaPlayerCallback;
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SESSION)
+    String m_kind;
+    RefPtr&lt;MediaSession&gt; m_session;
+#endif
+
</ins><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx">     RefPtr&lt;MediaSource&gt; m_mediaSource;
</span><span class="cx">     unsigned long m_droppedVideoFrames;
</span></span></pre>
</div>
</div>

</body>
</html>