<!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>[200254] 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/200254">200254</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2016-04-29 11:24:57 -0700 (Fri, 29 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebPlaybackControlsManager should not be owned by the WebPlaybackSessionInterfaceMac.
https://bugs.webkit.org/show_bug.cgi?id=157155
&lt;rdar://problem/25991724&gt;

Reviewed by Beth Dakin.

Move the WebPlaybackControlsManager class into its own header and implementation files.

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/WebPlaybackControlsManager.h: Added.
* platform/mac/WebPlaybackControlsManager.mm: Added.
(-[WebPlaybackControlsManager timing]): Moved from WebPlaybackSessionInterfaceMac.
(-[WebPlaybackControlsManager setTiming:]): Ditto.
(-[WebPlaybackControlsManager seekableTimeRanges]): Ditto.
(-[WebPlaybackControlsManager setSeekableTimeRanges:]): Ditto.
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Ditto.
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Ditto.
* platform/mac/WebPlaybackSessionInterfaceMac.h:
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
(-[WebPlaybackControlsManager initWithWebPlaybackSessionInterfaceMac:]): Deleted.
(-[WebPlaybackControlsManager timing]): Deleted.
(-[WebPlaybackControlsManager setTiming:]): Deleted.
(-[WebPlaybackControlsManager seekableTimeRanges]): Deleted.
(-[WebPlaybackControlsManager setSeekableTimeRanges:]): Deleted.
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Deleted.
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Deleted.
(WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebPlaybackSessionInterfaceMach">trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebPlaybackSessionInterfaceMacmm">trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacWebPlaybackControlsManagerh">trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebPlaybackControlsManagermm">trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200253 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-29 18:23:40 UTC (rev 200253)
+++ trunk/Source/WebCore/ChangeLog        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-04-28  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        WebPlaybackControlsManager should not be owned by the WebPlaybackSessionInterfaceMac.
+        https://bugs.webkit.org/show_bug.cgi?id=157155
+        &lt;rdar://problem/25991724&gt;
+
+        Reviewed by Beth Dakin.
+
+        Move the WebPlaybackControlsManager class into its own header and implementation files.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/mac/WebPlaybackControlsManager.h: Added.
+        * platform/mac/WebPlaybackControlsManager.mm: Added.
+        (-[WebPlaybackControlsManager timing]): Moved from WebPlaybackSessionInterfaceMac.
+        (-[WebPlaybackControlsManager setTiming:]): Ditto.
+        (-[WebPlaybackControlsManager seekableTimeRanges]): Ditto.
+        (-[WebPlaybackControlsManager setSeekableTimeRanges:]): Ditto.
+        (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Ditto.
+        (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Ditto.
+        * platform/mac/WebPlaybackSessionInterfaceMac.h:
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
+        (-[WebPlaybackControlsManager initWithWebPlaybackSessionInterfaceMac:]): Deleted.
+        (-[WebPlaybackControlsManager timing]): Deleted.
+        (-[WebPlaybackControlsManager setTiming:]): Deleted.
+        (-[WebPlaybackControlsManager seekableTimeRanges]): Deleted.
+        (-[WebPlaybackControlsManager setSeekableTimeRanges:]): Deleted.
+        (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Deleted.
+        (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Deleted.
+        (WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager): Deleted.
+
</ins><span class="cx"> 2016-04-29  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r200232.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (200253 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-29 18:23:40 UTC (rev 200253)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -6038,6 +6038,8 @@
</span><span class="cx">                 CD54DE4B17469C6D005E5B36 /* AudioSessionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */; };
</span><span class="cx">                 CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */; };
</span><span class="cx">                 CD5596921475B678001D0BD0 /* AudioFileReaderIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5596901475B678001D0BD0 /* AudioFileReaderIOS.h */; };
</span><ins>+                CD5896E11CD2B15100B3BCC8 /* WebPlaybackControlsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD5896DF1CD2B15100B3BCC8 /* WebPlaybackControlsManager.mm */; };
+                CD5896E21CD2B15100B3BCC8 /* WebPlaybackControlsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5896E01CD2B15100B3BCC8 /* WebPlaybackControlsManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5E5B5E1A15CE54000C609E /* PageConfiguration.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CD5E5B611A15F156000C609E /* PageConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5E5B601A15F156000C609E /* PageConfiguration.cpp */; };
</span><span class="cx">                 CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD60C0C4193E87C7003C656B /* MediaTimeQTKit.mm */; };
</span><span class="lines">@@ -14015,6 +14017,8 @@
</span><span class="cx">                 CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioFileReaderIOS.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5596901475B678001D0BD0 /* AudioFileReaderIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioFileReaderIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                CD5896DF1CD2B15100B3BCC8 /* WebPlaybackControlsManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPlaybackControlsManager.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                CD5896E01CD2B15100B3BCC8 /* WebPlaybackControlsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPlaybackControlsManager.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 CD5E5B5E1A15CE54000C609E /* PageConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageConfiguration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5E5B601A15F156000C609E /* PageConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageConfiguration.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD60C0C4193E87C7003C656B /* MediaTimeQTKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaTimeQTKit.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17905,6 +17909,8 @@
</span><span class="cx">                                 E1A3162C134BC32D007C9A4F /* WebNSAttributedStringExtras.mm */,
</span><span class="cx">                                 CDA29A151CBDA56C00901CCF /* WebPlaybackSessionInterfaceMac.h */,
</span><span class="cx">                                 CDA29A141CBDA56C00901CCF /* WebPlaybackSessionInterfaceMac.mm */,
</span><ins>+                                CD5896DF1CD2B15100B3BCC8 /* WebPlaybackControlsManager.mm */,
+                                CD5896E01CD2B15100B3BCC8 /* WebPlaybackControlsManager.h */,
</ins><span class="cx">                                 CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */,
</span><span class="cx">                                 CD8203071395AB6A00F956C6 /* WebVideoFullscreenController.mm */,
</span><span class="cx">                                 CD8203081395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.h */,
</span><span class="lines">@@ -25940,6 +25946,7 @@
</span><span class="cx">                                 A7CA595D0B27BD9E00FA021D /* DragController.h in Headers */,
</span><span class="cx">                                 A7B6E69F0B291A9600D0529F /* DragData.h in Headers */,
</span><span class="cx">                                 A7CFB3D20B7ED10A0070C32D /* DragImage.h in Headers */,
</span><ins>+                                CD5896E21CD2B15100B3BCC8 /* WebPlaybackControlsManager.h in Headers */,
</ins><span class="cx">                                 81F65FF613788FAA00FF6F2D /* DragState.h in Headers */,
</span><span class="cx">                                 E1BA66F11742BD8600C20251 /* DynamicLinkerInterposing.h in Headers */,
</span><span class="cx">                                 CE1252451A16C22500864480 /* DynamicLinkerSPI.h in Headers */,
</span><span class="lines">@@ -31505,6 +31512,7 @@
</span><span class="cx">                                 163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */,
</span><span class="cx">                                 E48944A2180B57D800F165D8 /* SimpleLineLayout.cpp in Sources */,
</span><span class="cx">                                 585D6E031A1A792E00FA4F12 /* SimpleLineLayoutFlowContents.cpp in Sources */,
</span><ins>+                                CD5896E11CD2B15100B3BCC8 /* WebPlaybackControlsManager.mm in Sources */,
</ins><span class="cx">                                 E4E9B11B18145692003ACCDF /* SimpleLineLayoutFunctions.cpp in Sources */,
</span><span class="cx">                                 585D6DFC1A15355600FA4F12 /* SimpleLineLayoutResolver.cpp in Sources */,
</span><span class="cx">                                 582CB0551A78A2B200AFFCC4 /* SimpleLineLayoutTextFragmentIterator.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebPlaybackControlsManagerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h (0 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2016 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. AND ITS CONTRIBUTORS ``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 ITS 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 WebPlaybackControlsManager_h
+#define WebPlaybackControlsManager_h
+
+#if PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE)
+
+namespace WebCore {
+class WebPlaybackSessionInterfaceMac;
+}
+
+#if USE(APPLE_INTERNAL_SDK) &amp;&amp; ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
+#import &lt;WebKitAdditions/WebPlaybackControlsControllerAdditions.h&gt;
+#else
+
+WEBCORE_EXPORT
+@interface WebPlaybackControlsManager : NSObject {
+    NSTimeInterval _contentDuration;
+    RetainPtr&lt;AVValueTiming&gt; _timing;
+    RetainPtr&lt;NSArray&gt; _seekableTimeRanges;
+    BOOL _hasEnabledAudio;
+    BOOL _hasEnabledVideo;
+    float _rate;
+
+@private
+    WebCore::WebPlaybackSessionInterfaceMac* _webPlaybackSessionInterfaceMac;
+}
+
+@property (assign) WebCore::WebPlaybackSessionInterfaceMac* webPlaybackSessionInterfaceMac;
+@property (readwrite) NSTimeInterval contentDuration;
+@property (nonatomic, retain, readwrite) AVValueTiming *timing;
+@property (nonatomic, retain, readwrite) NSArray *seekableTimeRanges;
+@property (readwrite) BOOL hasEnabledAudio;
+@property (readwrite) BOOL hasEnabledVideo;
+@property (nonatomic) float rate;
+
+@end
+#endif // USE(APPLE_INTERNAL_SDK) &amp;&amp; ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
+
+#endif // PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE)
+
+#endif // WebPlaybackControlsManager_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebPlaybackControlsManagermm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (0 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+/*
+ * Copyright (C) 2016 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. AND ITS CONTRIBUTORS ``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 ITS 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;WebPlaybackControlsManager.h&quot;
+
+#if PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE)
+
+#if USE(APPLE_INTERNAL_SDK) &amp;&amp; ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
+#import &lt;WebKitAdditions/WebPlaybackControlsControllerAdditions.mm&gt;
+#else
+@implementation WebPlaybackControlsManager
+
+@synthesize contentDuration=_contentDuration;
+@synthesize hasEnabledAudio=_hasEnabledAudio;
+@synthesize hasEnabledVideo=_hasEnabledVideo;
+@synthesize rate=_rate;
+
+- (AVValueTiming *)timing
+{
+    return _timing.get();
+}
+
+- (void)setTiming:(AVValueTiming *)timing
+{
+    _timing = timing;
+}
+
+- (NSArray *)seekableTimeRanges
+{
+    return _seekableTimeRanges.get();
+}
+
+- (void)setSeekableTimeRanges:(NSArray *)timeRanges
+{
+    _seekableTimeRanges = timeRanges;
+}
+
+- (void)setAudioMediaSelectionOptions:(const Vector&lt;WTF::String&gt;&amp;)options withSelectedIndex:(NSUInteger)selectedIndex
+{
+    UNUSED_PARAM(options);
+    UNUSED_PARAM(selectedIndex);
+}
+
+- (void)setLegibleMediaSelectionOptions:(const Vector&lt;WTF::String&gt;&amp;)options withSelectedIndex:(NSUInteger)selectedIndex
+{
+    UNUSED_PARAM(options);
+    UNUSED_PARAM(selectedIndex);
+}
+
+@end
+#endif // USE(APPLE_INTERNAL_SDK) &amp;&amp; ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
+
+#endif // PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebPlaybackSessionInterfaceMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h (200253 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h        2016-04-29 18:23:40 UTC (rev 200253)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -74,6 +74,7 @@
</span><span class="cx">     WEBCORE_EXPORT void setWirelessVideoPlaybackDisabled(bool) final { }
</span><span class="cx">     WEBCORE_EXPORT void invalidate();
</span><span class="cx">     WEBCORE_EXPORT void ensureControlsManager();
</span><ins>+    WEBCORE_EXPORT void setPlayBackControlsManager(WebPlaybackControlsManager *);
</ins><span class="cx">     WEBCORE_EXPORT WebPlaybackControlsManager *playBackControlsManager();
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebPlaybackSessionInterfaceMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm (200253 => 200254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm        2016-04-29 18:23:40 UTC (rev 200253)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm        2016-04-29 18:24:57 UTC (rev 200254)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import &quot;IntRect.h&quot;
</span><span class="cx"> #import &quot;MediaTimeAVFoundation.h&quot;
</span><span class="cx"> #import &quot;TimeRanges.h&quot;
</span><ins>+#import &quot;WebPlaybackControlsManager.h&quot;
</ins><span class="cx"> #import &quot;WebPlaybackSessionModel.h&quot;
</span><span class="cx"> #import &lt;AVFoundation/AVFoundation.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -42,85 +43,6 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-#if USE(APPLE_INTERNAL_SDK) &amp;&amp; ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-#import &lt;WebKitAdditions/WebPlaybackControlsControllerAdditions.mm&gt;
-#else
-@interface WebPlaybackControlsManager : NSObject {
-    NSTimeInterval _contentDuration;
-    RetainPtr&lt;AVValueTiming&gt; _timing;
-    RetainPtr&lt;NSArray&gt; _seekableTimeRanges;
-    BOOL _hasEnabledAudio;
-    BOOL _hasEnabledVideo;
-    float _rate;
-
-@private
-    WebCore::WebPlaybackSessionInterfaceMac* _webPlaybackSessionInterfaceMac;
-}
-
-@property (readwrite) NSTimeInterval contentDuration;
-@property (nonatomic, retain, readwrite) AVValueTiming *timing;
-@property (nonatomic, retain, readwrite) NSArray *seekableTimeRanges;
-@property (readwrite) BOOL hasEnabledAudio;
-@property (readwrite) BOOL hasEnabledVideo;
-@property (nonatomic) float rate;
-
-- (instancetype)initWithWebPlaybackSessionInterfaceMac:(WebCore::WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac;
-
-@end
-
-@implementation WebPlaybackControlsManager
-
-@synthesize contentDuration=_contentDuration;
-@synthesize hasEnabledAudio=_hasEnabledAudio;
-@synthesize hasEnabledVideo=_hasEnabledVideo;
-@synthesize rate=_rate;
-
-- (instancetype)initWithWebPlaybackSessionInterfaceMac:(WebCore::WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _webPlaybackSessionInterfaceMac = webPlaybackSessionInterfaceMac;
-
-    return self;
-}
-
-- (AVValueTiming *)timing
-{
-    return _timing.get();
-}
-
-- (void)setTiming:(AVValueTiming *)timing
-{
-    _timing = timing;
-}
-
-- (NSArray *)seekableTimeRanges
-{
-    return _seekableTimeRanges.get();
-}
-
-- (void)setSeekableTimeRanges:(NSArray *)timeRanges
-{
-    _seekableTimeRanges = timeRanges;
-}
-
-- (void)setAudioMediaSelectionOptions:(const Vector&lt;WTF::String&gt;&amp;)options withSelectedIndex:(NSUInteger)selectedIndex
-{
-    UNUSED_PARAM(options);
-    UNUSED_PARAM(selectedIndex);
-}
-
-- (void)setLegibleMediaSelectionOptions:(const Vector&lt;WTF::String&gt;&amp;)options withSelectedIndex:(NSUInteger)selectedIndex
-{
-    UNUSED_PARAM(options);
-    UNUSED_PARAM(selectedIndex);
-}
-
-@end
-
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> WebPlaybackSessionInterfaceMac::~WebPlaybackSessionInterfaceMac()
</span><span class="lines">@@ -212,14 +134,17 @@
</span><span class="cx"> WebPlaybackControlsManager *WebPlaybackSessionInterfaceMac::playBackControlsManager()
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200
</span><del>-    if (!m_playbackControlsManager)
-        m_playbackControlsManager = adoptNS([[WebPlaybackControlsManager alloc] initWithWebPlaybackSessionInterfaceMac:this]);
</del><span class="cx">     return m_playbackControlsManager.get();
</span><span class="cx"> #else
</span><span class="cx">     return nil;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><del>-    
</del><ins>+
+void WebPlaybackSessionInterfaceMac::setPlayBackControlsManager(WebPlaybackControlsManager *manager)
+{
+    m_playbackControlsManager = manager;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif // PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE)
</span></span></pre>
</div>
</div>

</body>
</html>