[PAL] Move Sleep classes into PAL
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2017 21:08:21 +0000 (21:08 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2017 21:08:21 +0000 (21:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175456

Reviewed by Ryosuke Niwa.

Source/WebCore:

No new tests. No change in behavior.

* CMakeLists.txt:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSessionManager.cpp:
* platform/audio/PlatformMediaSessionManager.h:
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/CMakeLists.txt:
* pal/PlatformMac.cmake:
* pal/system/SleepDisabler.cpp: Renamed from Source/WebCore/platform/SleepDisabler.cpp.
* pal/system/SleepDisabler.h: Renamed from Source/WebCore/platform/SleepDisabler.h.
* pal/system/SystemSleepListener.cpp: Renamed from Source/WebCore/platform/SystemSleepListener.cpp.
* pal/system/SystemSleepListener.h: Renamed from Source/WebCore/platform/SystemSleepListener.h.
* pal/system/cocoa/SleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/cocoa/SleepDisablerCocoa.cpp.
* pal/system/cocoa/SleepDisablerCocoa.h: Renamed from Source/WebCore/platform/cocoa/SleepDisablerCocoa.h.
* pal/system/mac/SystemSleepListenerMac.h: Renamed from Source/WebCore/platform/mac/SystemSleepListenerMac.h.
* pal/system/mac/SystemSleepListenerMac.mm: Renamed from Source/WebCore/platform/mac/SystemSleepListenerMac.mm.

Source/WebKit:

* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:

Source/WebKitLegacy/mac:

* WebView/WebFullScreenController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220759 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/CMakeLists.txt
Source/WebCore/PAL/pal/PlatformMac.cmake
Source/WebCore/PAL/pal/system/SleepDisabler.cpp [moved from Source/WebCore/platform/SleepDisabler.cpp with 97% similarity]
Source/WebCore/PAL/pal/system/SleepDisabler.h [moved from Source/WebCore/platform/SleepDisabler.h with 92% similarity]
Source/WebCore/PAL/pal/system/SystemSleepListener.cpp [moved from Source/WebCore/platform/SystemSleepListener.cpp with 97% similarity]
Source/WebCore/PAL/pal/system/SystemSleepListener.h [moved from Source/WebCore/platform/SystemSleepListener.h with 93% similarity]
Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.cpp [moved from Source/WebCore/platform/cocoa/SleepDisablerCocoa.cpp with 98% similarity]
Source/WebCore/PAL/pal/system/cocoa/SleepDisablerCocoa.h [moved from Source/WebCore/platform/cocoa/SleepDisablerCocoa.h with 95% similarity]
Source/WebCore/PAL/pal/system/mac/SystemSleepListenerMac.h [moved from Source/WebCore/platform/mac/SystemSleepListenerMac.h with 91% similarity]
Source/WebCore/PAL/pal/system/mac/SystemSleepListenerMac.mm [moved from Source/WebCore/platform/mac/SystemSleepListenerMac.mm with 97% similarity]
Source/WebCore/PlatformMac.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/mac/WebVideoFullscreenController.h
Source/WebCore/platform/mac/WebVideoFullscreenController.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h
Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebFullScreenController.h

index 2f0cc81..d968180 100644 (file)
@@ -2257,9 +2257,7 @@ set(WebCore_SOURCES
     platform/ScrollbarThemeComposite.cpp
     platform/SharedBuffer.cpp
     platform/SharedBufferChunkReader.cpp
-    platform/SleepDisabler.cpp
     platform/StaticPasteboard.cpp
-    platform/SystemSleepListener.cpp
     platform/Theme.cpp
     platform/ThreadGlobalData.cpp
     platform/ThreadTimers.cpp
index f69bed8..7003635 100644 (file)
@@ -1,3 +1,22 @@
+2017-08-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move Sleep classes into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=175456
+
+        Reviewed by Ryosuke Niwa.
+
+        No new tests. No change in behavior.
+
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLMediaElement.cpp:
+        * html/HTMLMediaElement.h:
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        * platform/audio/PlatformMediaSessionManager.h:
+        * platform/mac/WebVideoFullscreenController.h:
+        * platform/mac/WebVideoFullscreenController.mm:
+
 2017-08-15  Youenn Fablet  <youenn@apple.com>
 
         [Cache API] Adding generic support for CacheStorage and Cache methods
index d906e92..cc6c403 100644 (file)
@@ -1,3 +1,22 @@
+2017-08-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move Sleep classes into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=175456
+
+        Reviewed by Ryosuke Niwa.
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/CMakeLists.txt:
+        * pal/PlatformMac.cmake:
+        * pal/system/SleepDisabler.cpp: Renamed from Source/WebCore/platform/SleepDisabler.cpp.
+        * pal/system/SleepDisabler.h: Renamed from Source/WebCore/platform/SleepDisabler.h.
+        * pal/system/SystemSleepListener.cpp: Renamed from Source/WebCore/platform/SystemSleepListener.cpp.
+        * pal/system/SystemSleepListener.h: Renamed from Source/WebCore/platform/SystemSleepListener.h.
+        * pal/system/cocoa/SleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/cocoa/SleepDisablerCocoa.cpp.
+        * pal/system/cocoa/SleepDisablerCocoa.h: Renamed from Source/WebCore/platform/cocoa/SleepDisablerCocoa.h.
+        * pal/system/mac/SystemSleepListenerMac.h: Renamed from Source/WebCore/platform/mac/SystemSleepListenerMac.h.
+        * pal/system/mac/SystemSleepListenerMac.mm: Renamed from Source/WebCore/platform/mac/SystemSleepListenerMac.mm.
+
 2017-08-14  Simon Fraser  <simon.fraser@apple.com>
 
         Remove Proximity Events and related code
index 8e5e7f5..294481e 100644 (file)
                A3788E981F05B6CE00679425 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = A3788E971F05B6CE00679425 /* Sound.h */; };
                A3788E9C1F05B78200679425 /* SoundNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9B1F05B78200679425 /* SoundNone.cpp */; };
                A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9D1F05B78E00679425 /* SoundMac.mm */; };
+               A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E511F3D1DC5009C14B1 /* SleepDisabler.cpp */; };
+               A3AB6E561F3D1DDB009C14B1 /* SleepDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AB6E531F3D1DDB009C14B1 /* SleepDisabler.h */; };
+               A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E541F3D1DDB009C14B1 /* SystemSleepListener.cpp */; };
+               A3AB6E581F3D1DDB009C14B1 /* SystemSleepListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AB6E551F3D1DDB009C14B1 /* SystemSleepListener.h */; };
+               A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E5E1F3D1E39009C14B1 /* SleepDisablerCocoa.cpp */; };
+               A3AB6E611F3D1E39009C14B1 /* SleepDisablerCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AB6E5F1F3D1E39009C14B1 /* SleepDisablerCocoa.h */; };
+               A3AB6E641F3D217F009C14B1 /* SystemSleepListenerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AB6E621F3D217F009C14B1 /* SystemSleepListenerMac.h */; };
+               A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
                A3788E971F05B6CE00679425 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sound.h; path = system/Sound.h; sourceTree = "<group>"; };
                A3788E9B1F05B78200679425 /* SoundNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoundNone.cpp; path = system/SoundNone.cpp; sourceTree = "<group>"; };
                A3788E9D1F05B78E00679425 /* SoundMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SoundMac.mm; path = system/mac/SoundMac.mm; sourceTree = "<group>"; };
+               A3AB6E511F3D1DC5009C14B1 /* SleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SleepDisabler.cpp; path = system/SleepDisabler.cpp; sourceTree = "<group>"; };
+               A3AB6E531F3D1DDB009C14B1 /* SleepDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SleepDisabler.h; path = system/SleepDisabler.h; sourceTree = "<group>"; };
+               A3AB6E541F3D1DDB009C14B1 /* SystemSleepListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemSleepListener.cpp; path = system/SystemSleepListener.cpp; sourceTree = "<group>"; };
+               A3AB6E551F3D1DDB009C14B1 /* SystemSleepListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemSleepListener.h; path = system/SystemSleepListener.h; sourceTree = "<group>"; };
+               A3AB6E5E1F3D1E39009C14B1 /* SleepDisablerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SleepDisablerCocoa.cpp; path = system/cocoa/SleepDisablerCocoa.cpp; sourceTree = "<group>"; };
+               A3AB6E5F1F3D1E39009C14B1 /* SleepDisablerCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SleepDisablerCocoa.h; path = system/cocoa/SleepDisablerCocoa.h; sourceTree = "<group>"; };
+               A3AB6E621F3D217F009C14B1 /* SystemSleepListenerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemSleepListenerMac.h; path = system/mac/SystemSleepListenerMac.h; sourceTree = "<group>"; };
+               A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SystemSleepListenerMac.mm; path = system/mac/SystemSleepListenerMac.mm; sourceTree = "<group>"; };
                C2147A4A1EFD0AA600056FA5 /* CopyPALHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyPALHeaders.xcconfig; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
                A3788E9F1F05B7CE00679425 /* system */ = {
                        isa = PBXGroup;
                        children = (
+                               A3AB6E5D1F3D1E28009C14B1 /* cocoa */,
                                A3788EA01F05B7E200679425 /* mac */,
+                               A3AB6E511F3D1DC5009C14B1 /* SleepDisabler.cpp */,
+                               A3AB6E531F3D1DDB009C14B1 /* SleepDisabler.h */,
                                A3788E971F05B6CE00679425 /* Sound.h */,
                                A3788E9B1F05B78200679425 /* SoundNone.cpp */,
+                               A3AB6E541F3D1DDB009C14B1 /* SystemSleepListener.cpp */,
+                               A3AB6E551F3D1DDB009C14B1 /* SystemSleepListener.h */,
                        );
                        name = system;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                A3788E9D1F05B78E00679425 /* SoundMac.mm */,
+                               A3AB6E621F3D217F009C14B1 /* SystemSleepListenerMac.h */,
+                               A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */,
                        );
                        name = mac;
                        sourceTree = "<group>";
                };
+               A3AB6E5D1F3D1E28009C14B1 /* cocoa */ = {
+                       isa = PBXGroup;
+                       children = (
+                               A3AB6E5E1F3D1E39009C14B1 /* SleepDisablerCocoa.cpp */,
+                               A3AB6E5F1F3D1E39009C14B1 /* SleepDisablerCocoa.h */,
+                       );
+                       name = cocoa;
+                       sourceTree = "<group>";
+               };
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
                        isa = PBXHeadersBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               A3AB6E561F3D1DDB009C14B1 /* SleepDisabler.h in Headers */,
+                               A3AB6E611F3D1E39009C14B1 /* SleepDisablerCocoa.h in Headers */,
                                0C2DA13E1F3BEB4900DBC317 /* AVKitSPI.h in Headers */,
                                0C2DA06D1F33CA8400DBC317 /* CFLocaleSPI.h in Headers */,
                                0C2DA06E1F33CA8400DBC317 /* CFNetworkConnectionCacheSPI.h in Headers */,
+                               A3AB6E641F3D217F009C14B1 /* SystemSleepListenerMac.h in Headers */,
                                0C2DA06F1F33CA8400DBC317 /* CFNetworkSPI.h in Headers */,
                                0C2DA13F1F3BEB4900DBC317 /* CFNSURLConnectionSPI.h in Headers */,
                                0C2DA0701F33CA8400DBC317 /* CFUtilitiesSPI.h in Headers */,
                                0C2DA1521F3BEB4900DBC317 /* NSURLConnectionSPI.h in Headers */,
                                0C2DA1531F3BEB4900DBC317 /* NSURLDownloadSPI.h in Headers */,
                                0C2DA1541F3BEB4900DBC317 /* NSURLFileTypeMappingsSPI.h in Headers */,
+                               A3AB6E581F3D1DDB009C14B1 /* SystemSleepListener.h in Headers */,
                                0C2DA1551F3BEB4900DBC317 /* PassKitSPI.h in Headers */,
                                0C2DA1561F3BEB4900DBC317 /* pthreadSPI.h in Headers */,
                                0C2DA1571F3BEB4900DBC317 /* QuartzCoreSPI.h in Headers */,
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */,
                                1C09D0561E31C46500725F18 /* CryptoDigestCommonCrypto.cpp in Sources */,
+                               A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */,
+                               A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */,
                                A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */,
                                A30D41221F0DD0EA00B71954 /* KillRingNone.cpp in Sources */,
                                A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */,
                                A3788E9C1F05B78200679425 /* SoundNone.cpp in Sources */,
+                               A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 556a508..6143e94 100644 (file)
@@ -1,4 +1,6 @@
 set(PAL_SOURCES
+    system/SleepDisabler.cpp
+    system/SystemSleepListener.cpp
 )
 
 set(PAL_INCLUDE_DIRECTORIES
index 42878a6..5460496 100644 (file)
@@ -1,7 +1,10 @@
 list(APPEND PAL_SOURCES
     crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
 
+    system/cocoa/SleepDisablerCocoa.cpp
+
     system/mac/SoundMac.mm
+    system/mac/SystemSleepListenerMac.mm
 
     text/mac/KillRingMac.mm
 )
similarity index 97%
rename from Source/WebCore/platform/SleepDisabler.cpp
rename to Source/WebCore/PAL/pal/system/SleepDisabler.cpp
index b243e77..c3cd247 100644 (file)
  * 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. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include "config.h"
 #include "SleepDisabler.h"
 
-namespace WebCore {
+namespace PAL {
 
 #if !PLATFORM(COCOA)
 std::unique_ptr<SleepDisabler> SleepDisabler::create(const char* reason, Type type)
@@ -44,4 +44,4 @@ SleepDisabler::~SleepDisabler()
 {
 }
 
-}
+} // namespace PAL
similarity index 92%
rename from Source/WebCore/platform/SleepDisabler.h
rename to Source/WebCore/PAL/pal/system/SleepDisabler.h
index 9717e9a..dc09e94 100644 (file)
  * 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. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #pragma once
 
-namespace WebCore {
+namespace PAL {
 
 class SleepDisabler {
 public:
@@ -34,12 +34,12 @@ public:
         Display,
     };
     static std::unique_ptr<SleepDisabler> create(const char*, Type);
-    WEBCORE_EXPORT virtual ~SleepDisabler();
+    PAL_EXPORT virtual ~SleepDisabler();
 
     Type type() const { return m_type; }
 
 protected:
-    WEBCORE_EXPORT SleepDisabler(const char*, Type);
+    PAL_EXPORT SleepDisabler(const char*, Type);
     Type m_type;
 };
 
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "SystemSleepListener.h"
 
-namespace WebCore {
+namespace PAL {
 
 #if !PLATFORM(MAC)
 std::unique_ptr<SystemSleepListener> SystemSleepListener::create(Client& client)
@@ -40,4 +40,4 @@ SystemSleepListener::SystemSleepListener(Client& client)
 {
 }
 
-}
+} // namespace PAL
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef SystemSleepListener_h
-#define SystemSleepListener_h
+#pragma once
 
-namespace WebCore {
+namespace PAL {
 
 class SystemSleepListener {
 public:
@@ -44,11 +43,8 @@ public:
 
 protected:
     SystemSleepListener(Client&);
-    
+
     Client& m_client;
 };
 
-}
-
-
-#endif // SystemSleepListener_h
+} // namespace PAL
@@ -31,7 +31,7 @@
 #include <pal/spi/cocoa/IOPMLibSPI.h>
 #include <wtf/RetainPtr.h>
 
-namespace WebCore {
+namespace PAL {
 
 std::unique_ptr<SleepDisabler> SleepDisabler::create(const char* reason, Type type)
 {
@@ -65,6 +65,6 @@ SleepDisablerCocoa::~SleepDisablerCocoa()
     IOPMAssertionRelease(m_sleepAssertion);
 }
 
-}
+} // namespace PAL
 
 #endif // PLATFORM(COCOA)
@@ -27,9 +27,9 @@
 
 #if PLATFORM(COCOA)
 
-#include "SleepDisabler.h"
+#include <pal/system/SleepDisabler.h>
 
-namespace WebCore {
+namespace PAL {
 
 class SleepDisablerCocoa : public SleepDisabler {
 public:
@@ -40,6 +40,6 @@ private:
     uint32_t m_sleepAssertion;
 };
 
-}
+} // namespace PAL
 
 #endif // PLATFORM(COCOA)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef SystemSleepListenerMac_h
-#define SystemSleepListenerMac_h
+#pragma once
 
 #if PLATFORM(MAC)
 
-#include "SystemSleepListener.h"
-
+#include <pal/system/SystemSleepListener.h>
 #include <wtf/WeakPtr.h>
 
-namespace WebCore {
+namespace PAL {
 
 class SystemSleepListenerMac : public SystemSleepListener {
     WTF_MAKE_FAST_ALLOCATED;
@@ -47,8 +45,6 @@ protected:
     id m_wakeObserver;
 };
 
-}
+} // namespace PAL
 
 #endif // PLATFORM(MAC)
-
-#endif // SystemSleepListenerMac_h
 
 #if PLATFORM(MAC)
 
+#import <AppKit/AppKit.h>
 #import <wtf/MainThread.h>
 
-namespace WebCore {
+namespace PAL {
 
 std::unique_ptr<SystemSleepListener> SystemSleepListener::create(Client& client)
 {
@@ -70,6 +71,6 @@ SystemSleepListenerMac::~SystemSleepListenerMac()
     [center removeObserver:m_wakeObserver];
 }
 
-}
+} // namespace PAL
 
 #endif // PLATFORM(MAC)
index 12d7325..2bdd244 100644 (file)
@@ -316,7 +316,6 @@ list(APPEND WebCore_SOURCES
     platform/cocoa/ScrollSnapAnimatorState.mm
     platform/cocoa/SearchPopupMenuCocoa.mm
     platform/cocoa/SharedBufferCocoa.mm
-    platform/cocoa/SleepDisablerCocoa.cpp
     platform/cocoa/SystemVersion.mm
     platform/cocoa/TelephoneNumberDetectorCocoa.cpp
     platform/cocoa/ThemeCocoa.mm
@@ -503,7 +502,6 @@ list(APPEND WebCore_SOURCES
     platform/mac/SerializedPlatformRepresentationMac.mm
     platform/mac/StringUtilities.mm
     platform/mac/SuddenTermination.mm
-    platform/mac/SystemSleepListenerMac.mm
     platform/mac/ThemeMac.mm
     platform/mac/ThreadCheck.mm
     platform/mac/URLMac.mm
@@ -726,7 +724,6 @@ set(WebCore_FORWARDING_HEADERS_FILES
     loader/mac/LoaderNSURLExtras.h
 
     platform/PlatformExportMacros.h
-    platform/SleepDisabler.h
 
     platform/audio/AudioHardwareListener.h
 
index a0a50a6..49bc5d0 100644 (file)
                5D5975B419635F1100D00878 /* SystemVersion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D5975B219635F1100D00878 /* SystemVersion.mm */; };
                5D5975B71963637B00D00878 /* UserAgent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D5975B61963637B00D00878 /* UserAgent.mm */; };
                5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */; };
-               5D8C4DBF1428222C0026CE72 /* SleepDisablerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D8C4DBD1428222C0026CE72 /* SleepDisablerCocoa.cpp */; };
-               5D8C4DC01428222C0026CE72 /* SleepDisablerCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D8C4DBE1428222C0026CE72 /* SleepDisablerCocoa.h */; };
                5D925B670F64D4DD00B847F0 /* ScrollAlignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D925B650F64D4DD00B847F0 /* ScrollAlignment.cpp */; };
                5D925B680F64D4DD00B847F0 /* ScrollAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D925B660F64D4DD00B847F0 /* ScrollAlignment.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5DA5E0FC102B953800088CF9 /* JSWebSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DA5E0FA102B953800088CF9 /* JSWebSocket.cpp */; };
                CD4BE52A1CE136EF009D87DA /* GenericTaskQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4BE5291CE13425009D87DA /* GenericTaskQueue.cpp */; };
                CD5209E41B0BD8380077184E /* MediaPlayerEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               CD52481A18E200ED0008A07D /* SleepDisabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD52481818E200ED0008A07D /* SleepDisabler.cpp */; };
-               CD52481B18E200ED0008A07D /* SleepDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = CD52481918E200ED0008A07D /* SleepDisabler.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD525BA31EE0B10700788DF5 /* FourCC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD525BA11EE0B10700788DF5 /* FourCC.cpp */; };
                CD525BA41EE0B10700788DF5 /* FourCC.h in Headers */ = {isa = PBXBuildFile; fileRef = CD525BA21EE0B10700788DF5 /* FourCC.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */; };
                CD9DE17D17AAC75B00EA386D /* JSSourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17917AAC75B00EA386D /* JSSourceBufferList.h */; };
                CD9DE18117AAD6A400EA386D /* DOMURLMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE17E17AAD64E00EA386D /* DOMURLMediaSource.cpp */; };
                CD9DE18217AAD6A400EA386D /* DOMURLMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17F17AAD64E00EA386D /* DOMURLMediaSource.h */; };
-               CDA07FBD18E0A16A004699FA /* SystemSleepListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA07FBB18E0A16A004699FA /* SystemSleepListener.cpp */; };
-               CDA07FBE18E0A16A004699FA /* SystemSleepListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA07FBC18E0A16A004699FA /* SystemSleepListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               CDA07FC118E0A22B004699FA /* SystemSleepListenerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA07FBF18E0A22B004699FA /* SystemSleepListenerMac.mm */; };
-               CDA07FC218E0A22B004699FA /* SystemSleepListenerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA07FC018E0A22B004699FA /* SystemSleepListenerMac.h */; };
                CDA29A091CBD99F400901CCF /* PlaybackSessionInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA29A081CBD99F400901CCF /* PlaybackSessionInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CDA29A0B1CBD9A7400901CCF /* PlaybackSessionModel.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA29A0A1CBD9A7400901CCF /* PlaybackSessionModel.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CDA29A0E1CBD9CFE00901CCF /* PlaybackSessionModelMediaElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA29A0C1CBD9CFE00901CCF /* PlaybackSessionModelMediaElement.mm */; };
                5D5975B119635F1100D00878 /* SystemVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemVersion.h; sourceTree = "<group>"; };
                5D5975B219635F1100D00878 /* SystemVersion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemVersion.mm; sourceTree = "<group>"; };
                5D5975B61963637B00D00878 /* UserAgent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UserAgent.mm; sourceTree = "<group>"; };
-               5D8C4DBD1428222C0026CE72 /* SleepDisablerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SleepDisablerCocoa.cpp; sourceTree = "<group>"; };
-               5D8C4DBE1428222C0026CE72 /* SleepDisablerCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SleepDisablerCocoa.h; sourceTree = "<group>"; };
                5D925B650F64D4DD00B847F0 /* ScrollAlignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAlignment.cpp; sourceTree = "<group>"; };
                5D925B660F64D4DD00B847F0 /* ScrollAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAlignment.h; sourceTree = "<group>"; };
                5DA5E0FA102B953800088CF9 /* JSWebSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebSocket.cpp; sourceTree = "<group>"; };
                CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = "<group>"; };
                CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerEnums.h; sourceTree = "<group>"; };
                CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementEnums.h; sourceTree = "<group>"; };
-               CD52481818E200ED0008A07D /* SleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SleepDisabler.cpp; sourceTree = "<group>"; };
-               CD52481918E200ED0008A07D /* SleepDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SleepDisabler.h; sourceTree = "<group>"; };
                CD525BA11EE0B10700788DF5 /* FourCC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FourCC.cpp; sourceTree = "<group>"; };
                CD525BA21EE0B10700788DF5 /* FourCC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FourCC.h; sourceTree = "<group>"; };
                CD5393CB175DCCE600C07123 /* MemoryInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInfo.h; sourceTree = "<group>"; };
                CD9DE17E17AAD64E00EA386D /* DOMURLMediaSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMURLMediaSource.cpp; sourceTree = "<group>"; };
                CD9DE17F17AAD64E00EA386D /* DOMURLMediaSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMURLMediaSource.h; sourceTree = "<group>"; };
                CD9DE18017AAD64E00EA386D /* DOMURLMediaSource.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMURLMediaSource.idl; sourceTree = "<group>"; };
-               CDA07FBB18E0A16A004699FA /* SystemSleepListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemSleepListener.cpp; sourceTree = "<group>"; };
-               CDA07FBC18E0A16A004699FA /* SystemSleepListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemSleepListener.h; sourceTree = "<group>"; };
-               CDA07FBF18E0A22B004699FA /* SystemSleepListenerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemSleepListenerMac.mm; sourceTree = "<group>"; };
-               CDA07FC018E0A22B004699FA /* SystemSleepListenerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemSleepListenerMac.h; sourceTree = "<group>"; };
                CDA29A081CBD99F400901CCF /* PlaybackSessionInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaybackSessionInterface.h; sourceTree = "<group>"; };
                CDA29A0A1CBD9A7400901CCF /* PlaybackSessionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaybackSessionModel.h; sourceTree = "<group>"; };
                CDA29A0C1CBD9CFE00901CCF /* PlaybackSessionModelMediaElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlaybackSessionModelMediaElement.mm; sourceTree = "<group>"; };
                                ECA680C61E67724500731D20 /* StringUtilities.h */,
                                ECA680C81E67730B00731D20 /* StringUtilities.mm */,
                                93B2D8170F9920EE006AE6B2 /* SuddenTermination.mm */,
-                               CDA07FC018E0A22B004699FA /* SystemSleepListenerMac.h */,
-                               CDA07FBF18E0A22B004699FA /* SystemSleepListenerMac.mm */,
                                BCE659E50EA92FB2007E4533 /* ThemeMac.h */,
                                BCE659E80EA92FFA007E4533 /* ThemeMac.mm */,
                                51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */,
                                0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */,
                                0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */,
                                1A4A95510B4EDCFF002D8C3C /* SharedBufferCocoa.mm */,
-                               5D8C4DBD1428222C0026CE72 /* SleepDisablerCocoa.cpp */,
-                               5D8C4DBE1428222C0026CE72 /* SleepDisablerCocoa.h */,
                                5D5975B119635F1100D00878 /* SystemVersion.h */,
                                5D5975B219635F1100D00878 /* SystemVersion.mm */,
                                7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */,
                                1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */,
                                1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */,
                                93309EA0099EB78C0056E581 /* SharedTimer.h */,
-                               CD52481818E200ED0008A07D /* SleepDisabler.cpp */,
-                               CD52481918E200ED0008A07D /* SleepDisabler.h */,
                                F587866202DE3B1101EA4122 /* SSLKeyGenerator.h */,
                                F433E9041DBBDBC200EF0D14 /* StaticPasteboard.cpp */,
                                F433E9021DBBDBA200EF0D14 /* StaticPasteboard.h */,
                                93B2D8150F9920D2006AE6B2 /* SuddenTermination.h */,
                                97627B9714FB5424002CDCA1 /* Supplementable.h */,
-                               CDA07FBB18E0A16A004699FA /* SystemSleepListener.cpp */,
-                               CDA07FBC18E0A16A004699FA /* SystemSleepListener.h */,
                                7CC564B618BABEA6001B9652 /* TelephoneNumberDetector.h */,
                                BCE65D310EAD1211007E4533 /* Theme.cpp */,
                                BCE658FE0EA9248A007E4533 /* Theme.h */,
                                9444CBD61D860C8B0073A074 /* SizesAttributeParser.h in Headers */,
                                9444CBD41D860C8B0073A074 /* SizesCalcParser.h in Headers */,
                                49E911CD0EF86D47009D0CAF /* SkewTransformOperation.h in Headers */,
-                               CD52481B18E200ED0008A07D /* SleepDisabler.h in Headers */,
-                               5D8C4DC01428222C0026CE72 /* SleepDisablerCocoa.h in Headers */,
                                4150F9F112B6E0E70008C860 /* SliderThumbElement.h in Headers */,
                                9B532EA41BA928570038A827 /* SlotAssignment.h in Headers */,
                                4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */,
                                E180811716FCF9CB00B80D07 /* SynchronousLoaderClient.h in Headers */,
                                26FAE4CF1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h in Headers */,
                                0F03C0741884695E00A5F8CA /* SystemMemory.h in Headers */,
-                               CDA07FBE18E0A16A004699FA /* SystemSleepListener.h in Headers */,
-                               CDA07FC218E0A22B004699FA /* SystemSleepListenerMac.h in Headers */,
                                5D5975B319635F1100D00878 /* SystemVersion.h in Headers */,
                                A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */,
                                463EB6231B8789E00096ED51 /* TagCollection.h in Headers */,
                                9444CBD51D860C8B0073A074 /* SizesAttributeParser.cpp in Sources */,
                                9444CBD31D860C8B0073A074 /* SizesCalcParser.cpp in Sources */,
                                49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */,
-                               CD52481A18E200ED0008A07D /* SleepDisabler.cpp in Sources */,
-                               5D8C4DBF1428222C0026CE72 /* SleepDisablerCocoa.cpp in Sources */,
                                4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */,
                                9B532EA31BA928570038A827 /* SlotAssignment.cpp in Sources */,
                                4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */,
                                442ABCD617D9262F00D30715 /* SynchronousLoaderClientCFNet.cpp in Sources */,
                                26FAE4CE1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp in Sources */,
                                E45390AE0EAFF4B5003695C8 /* SystemMemoryIOS.cpp in Sources */,
-                               CDA07FBD18E0A16A004699FA /* SystemSleepListener.cpp in Sources */,
-                               CDA07FC118E0A22B004699FA /* SystemSleepListenerMac.mm in Sources */,
                                5D5975B419635F1100D00878 /* SystemVersion.mm in Sources */,
                                463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */,
                                F55B3DD51251F12D003EF269 /* TelephoneInputType.cpp in Sources */,
index b8444e0..e7bd33e 100644 (file)
 #include "SessionID.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "SleepDisabler.h"
 #include "TimeRanges.h"
 #include "UserContentController.h"
 #include "UserGestureIndicator.h"
 #include <limits>
+#include <pal/system/SleepDisabler.h>
 #include <runtime/Uint8Array.h>
 #include <wtf/Algorithms.h>
 #include <wtf/CurrentTime.h>
@@ -6369,9 +6369,9 @@ void HTMLMediaElement::updateSleepDisabling()
     if (shouldDisableSleep == SleepType::None && m_sleepDisabler)
         m_sleepDisabler = nullptr;
     else if (shouldDisableSleep != SleepType::None) {
-        auto type = shouldDisableSleep == SleepType::Display ? SleepDisabler::Type::Display : SleepDisabler::Type::System;
+        auto type = shouldDisableSleep == SleepType::Display ? PAL::SleepDisabler::Type::Display : PAL::SleepDisabler::Type::System;
         if (!m_sleepDisabler || m_sleepDisabler->type() != type)
-            m_sleepDisabler = SleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback", type);
+            m_sleepDisabler = PAL::SleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback", type);
     }
 
     if (m_player)
index bf49d63..ea6496b 100644 (file)
 #include <wtf/StringPrintStream.h>
 #endif
 
+namespace PAL {
+class SleepDisabler;
+}
+
 namespace WebCore {
 
 class AudioSourceProvider;
@@ -67,7 +71,6 @@ class AudioTrackPrivate;
 class Blob;
 class DOMError;
 class DeferredPromise;
-class SleepDisabler;
 class Event;
 class HTMLSourceElement;
 class HTMLTrackElement;
@@ -1064,7 +1067,7 @@ private:
     friend class MediaController;
     RefPtr<MediaController> m_mediaController;
 
-    std::unique_ptr<SleepDisabler> m_sleepDisabler;
+    std::unique_ptr<PAL::SleepDisabler> m_sleepDisabler;
 
     WeakPtr<const MediaResourceLoader> m_lastMediaResourceLoaderForTesting;
 
index 2fec281..1f17ccc 100644 (file)
@@ -58,7 +58,7 @@ PlatformMediaSessionManager* PlatformMediaSessionManager::sharedManagerIfExists(
 #endif // !PLATFORM(COCOA)
 
 PlatformMediaSessionManager::PlatformMediaSessionManager()
-    : m_systemSleepListener(SystemSleepListener::create(*this))
+    : m_systemSleepListener(PAL::SystemSleepListener::create(*this))
 {
     resetRestrictions();
 }
index 842748f..c271d95 100644 (file)
@@ -29,8 +29,8 @@
 #include "AudioHardwareListener.h"
 #include "PlatformMediaSession.h"
 #include "RemoteCommandListener.h"
-#include "SystemSleepListener.h"
 #include <map>
+#include <pal/system/SystemSleepListener.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
@@ -40,7 +40,7 @@ class HTMLMediaElement;
 class PlatformMediaSession;
 class RemoteCommandListener;
 
-class PlatformMediaSessionManager : private RemoteCommandListenerClient, private SystemSleepListener::Client, private AudioHardwareListener::Client {
+class PlatformMediaSessionManager : private RemoteCommandListenerClient, private PAL::SystemSleepListener::Client, private AudioHardwareListener::Client {
     WTF_MAKE_FAST_ALLOCATED;
 public:
     WEBCORE_EXPORT static PlatformMediaSessionManager* sharedManagerIfExists();
@@ -135,14 +135,14 @@ private:
     void audioHardwareDidBecomeInactive() override { }
     void audioOutputDeviceChanged() override;
 
-    // SystemSleepListener
+    // PAL::SystemSleepListener
     void systemWillSleep() override;
     void systemDidWake() override;
 
     SessionRestrictions m_restrictions[PlatformMediaSession::MediaStreamCapturingAudio + 1];
     mutable Vector<PlatformMediaSession*> m_sessions;
     std::unique_ptr<RemoteCommandListener> m_remoteCommandListener;
-    std::unique_ptr<SystemSleepListener> m_systemSleepListener;
+    std::unique_ptr<PAL::SystemSleepListener> m_systemSleepListener;
     RefPtr<AudioHardwareListener> m_audioHardwareListener;
 
 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
index cd516c5..2b9beb2 100644 (file)
 #import <AppKit/NSScreen.h>
 #import <wtf/RefPtr.h>
 
-namespace WebCore {
+namespace PAL {
 class SleepDisabler;
+}
+
+namespace WebCore {
 class HTMLVideoElement;
 }
 
@@ -54,7 +57,7 @@ WEBCORE_EXPORT @interface WebVideoFullscreenController : NSWindowController {
     BOOL _isEndingFullscreen;
     BOOL _forceDisableAnimation;
 
-    std::unique_ptr<WebCore::SleepDisabler> _displaySleepDisabler;
+    std::unique_ptr<PAL::SleepDisabler> _displaySleepDisabler;
 }
 
 - (id <WebVideoFullscreenControllerDelegate>)delegate;
index 6587a29..f7de2ec 100644 (file)
@@ -34,8 +34,8 @@
 #import <AVFoundation/AVPlayerLayer.h>
 #import <Carbon/Carbon.h>
 #import <WebCore/HTMLVideoElement.h>
-#import <WebCore/SleepDisabler.h>
 #import <objc/runtime.h>
+#import <pal/system/SleepDisabler.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/SoftLinking.h>
 
@@ -366,7 +366,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
     
     if (rate && !_isEndingFullscreen) {
         if (!_displaySleepDisabler)
-            _displaySleepDisabler = SleepDisabler::create("com.apple.WebCore - Fullscreen video", SleepDisabler::Type::Display);
+            _displaySleepDisabler = PAL::SleepDisabler::create("com.apple.WebCore - Fullscreen video", PAL::SleepDisabler::Type::Display);
     } else
 #endif
         _displaySleepDisabler = nullptr;
index 2697240..a08f4a2 100644 (file)
@@ -1,3 +1,13 @@
+2017-08-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move Sleep classes into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=175456
+
+        Reviewed by Ryosuke Niwa.
+
+        * UIProcess/mac/WKFullScreenWindowController.h:
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+
 2017-08-15  Youenn Fablet  <youenn@apple.com>
 
         [Cache API] Adding generic support for CacheStorage and Cache methods
index 5b579dc..5b679eb 100644 (file)
@@ -40,9 +40,9 @@
 #import <WebCore/GeometryUtilities.h>
 #import <WebCore/IntRect.h>
 #import <WebCore/LocalizedStrings.h>
-#import <WebCore/SleepDisabler.h>
 #import <WebCore/WebCoreFullScreenPlaceholderView.h>
 #import <WebCore/WebCoreFullScreenWindow.h>
+#import <pal/system/SleepDisabler.h>
 #import <wtf/BlockObjCExceptions.h>
 
 using namespace WebKit;
index de91c16..d4e8207 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [PAL] Move Sleep classes into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=175456
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebView/WebFullScreenController.h:
+
 2017-08-15  Youenn Fablet  <youenn@apple.com>
 
         [Cache API] Adding generic support for CacheStorage and Cache methods
index 58cacdd..512afa6 100644 (file)
@@ -33,7 +33,6 @@
 @class WebWindowScaleAnimation;
 @class WebView;
 namespace WebCore {
-class SleepDisabler;
 class Element;
 class RenderBox;
 class EventListener;