Title: [185179] trunk/Source/WebCore
Revision
185179
Author
commit-qu...@webkit.org
Date
2015-06-03 16:41:52 -0700 (Wed, 03 Jun 2015)

Log Message

Add basic Media Session support to HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=145581

Patch by Matt Rajca <mra...@apple.com> 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):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (185178 => 185179)


--- 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)
@@ -9,6 +9,7 @@
     "${WEBCORE_DIR}/Modules/indexeddb"
     "${WEBCORE_DIR}/Modules/indieui"
     "${WEBCORE_DIR}/Modules/mediacontrols/"
+    "${WEBCORE_DIR}/Modules/mediasession"
     "${WEBCORE_DIR}/Modules/mediasource"
     "${WEBCORE_DIR}/Modules/mediastream"
     "${WEBCORE_DIR}/Modules/navigatorcontentutils"
@@ -218,6 +219,7 @@
 
     Modules/mediacontrols/MediaControlsHost.idl
 
+    Modules/mediasession/HTMLMediaElementMediaSession.idl
     Modules/mediasession/MediaRemoteControls.idl
     Modules/mediasession/MediaSession.idl
 
@@ -874,6 +876,7 @@
 
     Modules/mediacontrols/MediaControlsHost.cpp
 
+    Modules/mediasession/HTMLMediaElementMediaSession.cpp
     Modules/mediasession/MediaRemoteControls.cpp
     Modules/mediasession/MediaSession.cpp
 

Modified: trunk/Source/WebCore/ChangeLog (185178 => 185179)


--- 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)
@@ -1,3 +1,32 @@
+2015-06-03  Matt Rajca  <mra...@apple.com>
+
+        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):
+
 2015-06-03  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Cleanup after r185175.

Modified: trunk/Source/WebCore/DerivedSources.make (185178 => 185179)


--- 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)
@@ -104,6 +104,7 @@
     $(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \
     $(WebCore)/Modules/indieui/UIRequestEvent.idl \
     $(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
+    $(WebCore)/Modules/mediasession/HTMLMediaElementMediaSession.idl \
     $(WebCore)/Modules/mediasession/MediaRemoteControls.idl \
     $(WebCore)/Modules/mediasession/MediaSession.idl \
 	$(WebCore)/Modules/mediasource/DOMURLMediaSource.idl \

Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.cpp (0 => 185179)


--- 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)
@@ -0,0 +1,61 @@
+/*
+ * 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 "config.h"
+#include "HTMLMediaElementMediaSession.h"
+
+#if ENABLE(MEDIA_SESSION) && ENABLE(VIDEO)
+
+namespace WebCore {
+
+const String& HTMLMediaElementMediaSession::kind(HTMLMediaElement* element)
+{
+    ASSERT(element);
+    return element->kind();
+}
+
+void HTMLMediaElementMediaSession::setKind(WebCore::HTMLMediaElement* element, const String& kind)
+{
+    ASSERT(element);
+    return element->setKind(kind);
+}
+
+MediaSession* HTMLMediaElementMediaSession::session(HTMLMediaElement* element, bool& isNull)
+{
+    ASSERT(element);
+    MediaSession* session = element->session();
+    isNull = !session;
+    return session;
+}
+
+void HTMLMediaElementMediaSession::setSession(HTMLMediaElement* element, MediaSession* session)
+{
+    ASSERT(element);
+    element->setSession(session);
+}
+
+} // namespace WebCore
+
+#endif /* ENABLE(MEDIA_SESSION) && ENABLE(VIDEO) */

Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.h (0 => 185179)


--- 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)
@@ -0,0 +1,48 @@
+/*
+ * 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) && ENABLE(VIDEO)
+
+#include "HTMLMediaElement.h"
+
+namespace WebCore {
+
+class HTMLMediaElementMediaSession {
+public:
+    static const String& kind(HTMLMediaElement*);
+    static void setKind(HTMLMediaElement*, const String&);
+
+    static MediaSession* session(HTMLMediaElement*, bool&);
+    static void setSession(HTMLMediaElement*, MediaSession*);
+};
+
+} // namespace WebCore
+
+#endif /* ENABLE(MEDIA_SESSION) && ENABLE(VIDEO) */
+
+#endif /* HTMLMediaElementMediaSession_h */

Added: trunk/Source/WebCore/Modules/mediasession/HTMLMediaElementMediaSession.idl (0 => 185179)


--- 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)
@@ -0,0 +1,34 @@
+/*
+ * 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&MEDIA_SESSION,
+] partial interface HTMLMediaElement {
+    attribute DOMString kind;
+
+#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
+    attribute MediaSession? session;
+#endif
+};

Modified: trunk/Source/WebCore/PlatformMac.cmake (185178 => 185179)


--- 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)
@@ -570,6 +570,7 @@
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHistory.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLFormControlsCollection.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElement.mm
+    ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElementMediaSession.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLMediaElementMediaStream.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLTrackElement.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMHTMLVideoElement.mm

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreIncludeCommon.props (185178 => 185179)


--- 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)
@@ -5,7 +5,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <AdditionalIncludeDirectories>$(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\_javascript_Core;$(ConfigurationBuildDir)\include\private\_javascript_Core;$(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\_javascript_Core;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\_javascript_Core;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(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\_javascript_Core;$(ConfigurationBuildDir)\include\private\_javascript_Core;$(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\_javascript_Core;$(WebKit_Libraries)\include\sqlite;$(WebKit_Libraries)\include\_javascript_Core;$(WebKit_Libraries)\include\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
   </ItemDefinitionGroup>
 </Project>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185178 => 185179)


--- 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)
@@ -5695,6 +5695,8 @@
 		C9027F421B1D0AD200BFBFEF /* MediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C9027F401B1D0AD200BFBFEF /* MediaSession.h */; };
 		C90843CF1B18E47D00B68564 /* MediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */; };
 		C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */ = {isa = PBXBuildFile; fileRef = C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */; };
+		C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */; };
+		C968B2E81B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */; };
 		C9DADBCB1B1D3B97001F17D8 /* JSMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */; };
 		CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; };
 		CA3BF67E10D99BAE00E6CE53 /* ScrollAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = CA3BF67D10D99BAE00E6CE53 /* ScrollAnimator.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -13261,6 +13263,9 @@
 		C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRemoteControls.cpp; sourceTree = "<group>"; };
 		C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRemoteControls.h; sourceTree = "<group>"; };
 		C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRemoteControls.idl; sourceTree = "<group>"; };
+		C968B2E51B1E704500EF1F81 /* HTMLMediaElementMediaSession.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLMediaElementMediaSession.idl; sourceTree = "<group>"; };
+		C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementMediaSession.h; sourceTree = "<group>"; };
+		C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMediaElementMediaSession.cpp; sourceTree = "<group>"; };
 		C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaSession.cpp; sourceTree = "<group>"; };
 		C9DADBCA1B1D3B25001F17D8 /* JSMediaSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaSession.h; sourceTree = "<group>"; };
 		CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimator.cpp; sourceTree = "<group>"; };
@@ -14606,6 +14611,9 @@
 		0709D78B1AE5552E004E42F8 /* mediasession */ = {
 			isa = PBXGroup;
 			children = (
+				C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */,
+				C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */,
+				C968B2E51B1E704500EF1F81 /* HTMLMediaElementMediaSession.idl */,
 				C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */,
 				C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */,
 				C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */,
@@ -24936,6 +24944,7 @@
 				A8EA7CAB0A192B9C00A8EF5F /* HTMLMarqueeElement.h in Headers */,
 				E44613A50CD6331000FADA75 /* HTMLMediaElement.h in Headers */,
 				CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */,
+				C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */,
 				0779BF0E18453168000B6AE7 /* HTMLMediaElementMediaStream.h in Headers */,
 				A8EA79F40A1916DF00A8EF5F /* HTMLMenuElement.h in Headers */,
 				2BE8E2C712A589EC00FAD550 /* HTMLMetaCharsetParser.h in Headers */,
@@ -28449,6 +28458,7 @@
 				A8EA7D320A19385500A8EF5F /* HTMLMapElement.cpp in Sources */,
 				A8EA7CAC0A192B9C00A8EF5F /* HTMLMarqueeElement.cpp in Sources */,
 				E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */,
+				C968B2E81B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp in Sources */,
 				0779BF0D18453168000B6AE7 /* HTMLMediaElementMediaStream.cpp in Sources */,
 				A8EA79F80A1916DF00A8EF5F /* HTMLMenuElement.cpp in Sources */,
 				2BE8E2C912A58A0100FAD550 /* HTMLMetaCharsetParser.cpp in Sources */,

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (185178 => 185179)


--- 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)
@@ -114,6 +114,10 @@
 #include "WebKitPlaybackTargetAvailabilityEvent.h"
 #endif
 
+#if ENABLE(MEDIA_SESSION)
+#include "MediaSession.h"
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
 #include "DOMWindow.h"
 #include "MediaSource.h"
@@ -6354,6 +6358,20 @@
     return false;
 }
 
+#if ENABLE(MEDIA_SESSION)
+
+MediaSession* HTMLMediaElement::session() const
+{
+    return m_session.get();
 }
 
+void HTMLMediaElement::setSession(MediaSession* session)
+{
+    m_session = session;
+}
+
 #endif
+
+}
+
+#endif

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (185178 => 185179)


--- 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)
@@ -72,6 +72,9 @@
 #if ENABLE(ENCRYPTED_MEDIA_V2)
 class MediaKeys;
 #endif
+#if ENABLE(MEDIA_SESSION)
+class MediaSession;
+#endif
 #if ENABLE(MEDIA_SOURCE)
 class MediaSource;
 class SourceBuffer;
@@ -411,6 +414,14 @@
     void mediaLoadingFailed(MediaPlayerEnums::NetworkState);
     void mediaLoadingFailedFatally(MediaPlayerEnums::NetworkState);
 
+#if ENABLE(MEDIA_SESSION)
+    const String& kind() const { return m_kind; }
+    void setKind(const String& kind) { m_kind = kind; }
+
+    MediaSession* session() const;
+    void setSession(MediaSession*);
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
     RefPtr<VideoPlaybackQuality> getVideoPlaybackQuality();
 #endif
@@ -789,6 +800,11 @@
     // calling the media engine recursively.
     int m_processingMediaPlayerCallback;
 
+#if ENABLE(MEDIA_SESSION)
+    String m_kind;
+    RefPtr<MediaSession> m_session;
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
     RefPtr<MediaSource> m_mediaSource;
     unsigned long m_droppedVideoFrames;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to