Rename DisplaySleepDisabler -> SleepDisabler
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 16:39:57 +0000 (16:39 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 16:39:57 +0000 (16:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172478

Reviewed by Sam Weinig.

Source/WebCore:

Rename DisplaySleepDisabler to SleepDisabler so that different (i.e., non-Display) sleep types can be
added in a future change.

* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateSleepDisabling):
* html/HTMLMediaElement.h:
* platform/SleepDisabler.cpp: Renamed from Source/WebCore/platform/DisplaySleepDisabler.cpp.
(WebCore::SleepDisabler::create):
(WebCore::SleepDisabler::SleepDisabler):
(WebCore::SleepDisabler::~SleepDisabler):
* platform/SleepDisabler.h: Renamed from Source/WebCore/platform/DisplaySleepDisabler.h.
* platform/cocoa/SleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.cpp.
(WebCore::SleepDisabler::create):
(WebCore::SleepDisablerCocoa::SleepDisablerCocoa):
(WebCore::SleepDisablerCocoa::~SleepDisablerCocoa):
* platform/cocoa/SleepDisablerCocoa.h: Renamed from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.h.
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController updatePowerAssertions]):
* CMakeLists.txt:
* PlatformMac.cmake:
* WebCore.order:

Source/WebKit/mac:

* WebView/WebFullScreenController.h:

Source/WebKit2:

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

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

18 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformMac.cmake
Source/WebCore/WebCore.order
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/SleepDisabler.cpp [moved from Source/WebCore/platform/DisplaySleepDisabler.cpp with 82% similarity]
Source/WebCore/platform/SleepDisabler.h [moved from Source/WebCore/platform/DisplaySleepDisabler.h with 83% similarity]
Source/WebCore/platform/cocoa/SleepDisablerCocoa.cpp [moved from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.cpp with 83% similarity]
Source/WebCore/platform/cocoa/SleepDisablerCocoa.h [moved from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.h with 83% similarity]
Source/WebCore/platform/mac/WebVideoFullscreenController.h
Source/WebCore/platform/mac/WebVideoFullscreenController.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFullScreenController.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

index e11040d..74ffde3 100644 (file)
@@ -2152,7 +2152,6 @@ set(WebCore_SOURCES
     platform/Cursor.cpp
     platform/DateComponents.cpp
     platform/Decimal.cpp
-    platform/DisplaySleepDisabler.cpp
     platform/DragData.cpp
     platform/DragImage.cpp
     platform/EventTrackingRegions.cpp
@@ -2189,6 +2188,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
index 02c28c7..f856f6c 100644 (file)
@@ -1,3 +1,34 @@
+2017-05-24  Jer Noble  <jer.noble@apple.com>
+
+        Rename DisplaySleepDisabler -> SleepDisabler
+        https://bugs.webkit.org/show_bug.cgi?id=172478
+
+        Reviewed by Sam Weinig.
+
+        Rename DisplaySleepDisabler to SleepDisabler so that different (i.e., non-Display) sleep types can be
+        added in a future change.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::updateSleepDisabling):
+        * html/HTMLMediaElement.h:
+        * platform/SleepDisabler.cpp: Renamed from Source/WebCore/platform/DisplaySleepDisabler.cpp.
+        (WebCore::SleepDisabler::create):
+        (WebCore::SleepDisabler::SleepDisabler):
+        (WebCore::SleepDisabler::~SleepDisabler):
+        * platform/SleepDisabler.h: Renamed from Source/WebCore/platform/DisplaySleepDisabler.h.
+        * platform/cocoa/SleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.cpp.
+        (WebCore::SleepDisabler::create):
+        (WebCore::SleepDisablerCocoa::SleepDisablerCocoa):
+        (WebCore::SleepDisablerCocoa::~SleepDisablerCocoa):
+        * platform/cocoa/SleepDisablerCocoa.h: Renamed from Source/WebCore/platform/cocoa/DisplaySleepDisablerCocoa.h.
+        * platform/mac/WebVideoFullscreenController.h:
+        * platform/mac/WebVideoFullscreenController.mm:
+        (-[WebVideoFullscreenController updatePowerAssertions]):
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+        * WebCore.order:
+
 2017-05-24  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] Create unique network storage session for each DRT.
index 2c2e4cc..9811be2 100644 (file)
@@ -338,7 +338,6 @@ list(APPEND WebCore_SOURCES
 
     platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
     platform/cocoa/CoreVideoSoftLink.cpp
-    platform/cocoa/DisplaySleepDisablerCocoa.cpp
     platform/cocoa/FileSystemCocoa.mm
     platform/cocoa/KeyEventCocoa.mm
     platform/cocoa/LocalizedStringsCocoa.mm
@@ -351,6 +350,7 @@ 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
@@ -753,8 +753,8 @@ set(WebCore_FORWARDING_HEADERS_FILES
 
     loader/mac/LoaderNSURLExtras.h
 
-    platform/DisplaySleepDisabler.h
     platform/PlatformExportMacros.h
+    platform/SleepDisabler.h
 
     platform/audio/AudioHardwareListener.h
 
index 89fb083..1ce9651 100644 (file)
@@ -19199,7 +19199,7 @@ __ZN7WebCore13MediaControls37refreshClosedCaptionsButtonVisibilityEv
 __ZN7WebCore13MediaControls19bufferingProgressedEv
 __ZThn144_NK7WebCore16HTMLMediaElement6pausedEv
 __ZN7WebCore13MediaControls15playbackStartedEv
-__ZN7WebCore20DisplaySleepDisablerC1EPKc
+__ZN7WebCore20SleepDisablerC1EPKc
 __ZN7WebCore13MediaControls18playbackProgressedEv
 __ZN7WebCore27MediaControlTimelineElement19defaultEventHandlerEPNS_5EventE
 __ZN7WebCore24MediaControlPanelElement19defaultEventHandlerEPNS_5EventE
@@ -19239,7 +19239,7 @@ __ZN7WebCore15JSTextTrackList7destroyEPN3JSC6JSCellE
 __ZN7WebCore11RenderTheme27mediaControlsFadeInDurationEv
 __ZN7WebCore13MediaControls18shouldHideControlsEv
 __ZN7WebCore13MediaControls32startHideFullscreenControlsTimerEv
-__ZN7WebCore20DisplaySleepDisablerD1Ev
+__ZN7WebCore20SleepDisablerD1Ev
 __ZNK7WebCore13AnimationBase16playStatePlayingEv
 __ZN7WebCore17LoadableTextTrack11clearClientEv
 __ZN7WebCore13TextTrackListD0Ev
@@ -24245,7 +24245,7 @@ __ZTVN7WebCore19KeygenSelectElementE
 __ZZN7WebCore19KeygenSelectElementC1EPNS_8DocumentEE8pseudoId
 __ZGVZN7WebCore19KeygenSelectElementC1EPNS_8DocumentEE8pseudoId
 __ZTVN7WebCore5TimerINS_11EventSenderINS_15HTMLLinkElementEEEEE
-__ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore20DisplaySleepDisablerEEE
+__ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore20SleepDisablerEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore15MediaControllerEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore9TextTrackEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore13TextTrackListEEE
@@ -30689,7 +30689,7 @@ _OBJC_IVAR_$_WebVideoFullscreenController._hudController
 _OBJC_IVAR_$_WebVideoFullscreenController._backgroundFullscreenWindow
 _OBJC_IVAR_$_WebVideoFullscreenController._isEndingFullscreen
 _OBJC_IVAR_$_WebVideoFullscreenController._forceDisableAnimation
-_OBJC_IVAR_$_WebVideoFullscreenController._displaySleepDisabler
+_OBJC_IVAR_$_WebVideoFullscreenController._SleepDisabler
 _OBJC_IVAR_$_WebVideoFullscreenWindow._controllerActionOnAnimationEnd
 _OBJC_IVAR_$_WebVideoFullscreenWindow._fullscreenAnimation
 _OBJC_IVAR_$_WebVideoFullscreenHUDWindowController._timeline
index 85618f5..06216cf 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 /* DisplaySleepDisablerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D8C4DBD1428222C0026CE72 /* DisplaySleepDisablerCocoa.cpp */; };
-               5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D8C4DBE1428222C0026CE72 /* DisplaySleepDisablerCocoa.h */; };
+               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 /* DisplaySleepDisabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD52481818E200ED0008A07D /* DisplaySleepDisabler.cpp */; };
-               CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = CD52481918E200ED0008A07D /* DisplaySleepDisabler.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, ); }; };
                CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */; };
                CD5393D4175E018600C07123 /* JSMemoryInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5393D2175E018600C07123 /* JSMemoryInfo.h */; };
                CD54A762180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */; };
                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 /* DisplaySleepDisablerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplaySleepDisablerCocoa.cpp; sourceTree = "<group>"; };
-               5D8C4DBE1428222C0026CE72 /* DisplaySleepDisablerCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplaySleepDisablerCocoa.h; 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 /* DisplaySleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplaySleepDisabler.cpp; sourceTree = "<group>"; };
-               CD52481918E200ED0008A07D /* DisplaySleepDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplaySleepDisabler.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>"; };
                CD5393CB175DCCE600C07123 /* MemoryInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInfo.h; sourceTree = "<group>"; };
                CD5393CC175DCCE600C07123 /* MemoryInfo.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MemoryInfo.idl; sourceTree = "<group>"; };
                CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMemoryInfo.cpp; sourceTree = "<group>"; };
                                CD7D33461C7A16BF00041293 /* CoreVideoSoftLink.h */,
                                7C7941E31C56C29300A4C58E /* DataDetectorsCoreSoftLink.h */,
                                7C7941E21C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm */,
-                               5D8C4DBD1428222C0026CE72 /* DisplaySleepDisablerCocoa.cpp */,
-                               5D8C4DBE1428222C0026CE72 /* DisplaySleepDisablerCocoa.h */,
+                               5D8C4DBD1428222C0026CE72 /* SleepDisablerCocoa.cpp */,
+                               5D8C4DBE1428222C0026CE72 /* SleepDisablerCocoa.h */,
                                514B3F750C722055000530DF /* FileSystemCocoa.mm */,
                                A5C974CF11485FF10066F2AB /* KeyEventCocoa.h */,
                                A5C974D011485FF10066F2AB /* KeyEventCocoa.mm */,
                                A5732B09136A161D005C8D7C /* DateComponents.h */,
                                45FEA5CD156DDE8C00654101 /* Decimal.cpp */,
                                45FEA5CE156DDE8C00654101 /* Decimal.h */,
-                               CD52481818E200ED0008A07D /* DisplaySleepDisabler.cpp */,
-                               CD52481918E200ED0008A07D /* DisplaySleepDisabler.h */,
+                               CD52481818E200ED0008A07D /* SleepDisabler.cpp */,
+                               CD52481918E200ED0008A07D /* SleepDisabler.h */,
                                A79546420B5C4CB4007B438F /* DragData.cpp */,
                                A7B6E69D0B291A9600D0529F /* DragData.h */,
                                A7CFB3CF0B7ED10A0070C32D /* DragImage.cpp */,
                                2D29ECCA192F1F1D00984B78 /* DisplayRefreshMonitorIOS.h in Headers */,
                                2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */,
                                2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
-                               CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */,
-                               5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */,
+                               CD52481B18E200ED0008A07D /* SleepDisabler.h in Headers */,
+                               5D8C4DC01428222C0026CE72 /* SleepDisablerCocoa.h in Headers */,
                                FD31609112B026F700C1A359 /* Distance.h in Headers */,
                                84730D771248F0B300D3A9C9 /* DistantLightSource.h in Headers */,
                                B2F34FE60E82F81400F627CD /* DNS.h in Headers */,
                                0F97A658155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm in Sources */,
                                49AF2D6C14435D210016A784 /* DisplayRefreshMonitorMac.cpp in Sources */,
                                2D29ECC7192ECC8300984B78 /* DisplayRefreshMonitorManager.cpp in Sources */,
-                               CD52481A18E200ED0008A07D /* DisplaySleepDisabler.cpp in Sources */,
-                               5D8C4DBF1428222C0026CE72 /* DisplaySleepDisablerCocoa.cpp in Sources */,
+                               CD52481A18E200ED0008A07D /* SleepDisabler.cpp in Sources */,
+                               5D8C4DBF1428222C0026CE72 /* SleepDisablerCocoa.cpp in Sources */,
                                FD31609012B026F700C1A359 /* Distance.cpp in Sources */,
                                A1E1154413015C3D0054AC8C /* DistantLightSource.cpp in Sources */,
                                B2F34FE90E82F82700F627CD /* DNSCFNet.cpp in Sources */,
index 47714f9..a34232d 100644 (file)
@@ -41,7 +41,6 @@
 #include "CookieJar.h"
 #include "DiagnosticLoggingClient.h"
 #include "DiagnosticLoggingKeys.h"
-#include "DisplaySleepDisabler.h"
 #include "Document.h"
 #include "DocumentLoader.h"
 #include "ElementIterator.h"
@@ -85,6 +84,7 @@
 #include "SessionID.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
+#include "SleepDisabler.h"
 #include "TimeRanges.h"
 #include "UserContentController.h"
 #include "UserGestureIndicator.h"
@@ -6350,7 +6350,7 @@ void HTMLMediaElement::updateSleepDisabling()
     if (!shouldDisableSleep && m_sleepDisabler)
         m_sleepDisabler = nullptr;
     else if (shouldDisableSleep && !m_sleepDisabler)
-        m_sleepDisabler = DisplaySleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback");
+        m_sleepDisabler = SleepDisabler::create("com.apple.WebCore: HTMLMediaElement playback");
 
     if (m_player)
         m_player->setShouldDisableSleep(shouldDisableSleep);
index 8ebf152..6029ecc 100644 (file)
@@ -67,7 +67,7 @@ class AudioTrackPrivate;
 class Blob;
 class DOMError;
 class DeferredPromise;
-class DisplaySleepDisabler;
+class SleepDisabler;
 class Event;
 class HTMLSourceElement;
 class HTMLTrackElement;
@@ -1056,7 +1056,7 @@ private:
     friend class MediaController;
     RefPtr<MediaController> m_mediaController;
 
-    std::unique_ptr<DisplaySleepDisabler> m_sleepDisabler;
+    std::unique_ptr<SleepDisabler> m_sleepDisabler;
 
     WeakPtr<const MediaResourceLoader> m_lastMediaResourceLoaderForTesting;
 
similarity index 82%
rename from Source/WebCore/platform/DisplaySleepDisabler.cpp
rename to Source/WebCore/platform/SleepDisabler.cpp
index 7c8e5d0..1ec287f 100644 (file)
  */
 
 #include "config.h"
-#include "DisplaySleepDisabler.h"
+#include "SleepDisabler.h"
 
 namespace WebCore {
 
 #if !PLATFORM(COCOA)
-std::unique_ptr<DisplaySleepDisabler> DisplaySleepDisabler::create(const char* reason)
+std::unique_ptr<SleepDisabler> SleepDisabler::create(const char* reason)
 {
-    return std::unique_ptr<DisplaySleepDisabler>(new DisplaySleepDisabler(reason));
+    return std::unique_ptr<SleepDisabler>(new SleepDisabler(reason));
 }
 #endif // !PLATFORM(COCOA)
 
-DisplaySleepDisabler::DisplaySleepDisabler(const char*)
+SleepDisabler::SleepDisabler(const char*)
 {
 }
 
-DisplaySleepDisabler::~DisplaySleepDisabler()
+SleepDisabler::~SleepDisabler()
 {
 }
 
similarity index 83%
rename from Source/WebCore/platform/DisplaySleepDisabler.h
rename to Source/WebCore/platform/SleepDisabler.h
index 052896f..3bfab95 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef DisplaySleepDisabler_h
-#define DisplaySleepDisabler_h
+#pragma once
 
 namespace WebCore {
 
-class DisplaySleepDisabler {
+class SleepDisabler {
 public:
-    static std::unique_ptr<DisplaySleepDisabler> create(const char*);
-    WEBCORE_EXPORT virtual ~DisplaySleepDisabler();
+    static std::unique_ptr<SleepDisabler> create(const char*);
+    WEBCORE_EXPORT virtual ~SleepDisabler();
 
 protected:
-    WEBCORE_EXPORT DisplaySleepDisabler(const char*);
+    WEBCORE_EXPORT SleepDisabler(const char*);
 };
 
 }
-
-#endif
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "DisplaySleepDisablerCocoa.h"
+#include "SleepDisablerCocoa.h"
 
 #if PLATFORM(COCOA)
 
 
 namespace WebCore {
 
-std::unique_ptr<DisplaySleepDisabler> DisplaySleepDisabler::create(const char* reason)
+std::unique_ptr<SleepDisabler> SleepDisabler::create(const char* reason)
 {
-    return std::unique_ptr<DisplaySleepDisabler>(new DisplaySleepDisablerCocoa(reason));
+    return std::unique_ptr<SleepDisabler>(new SleepDisablerCocoa(reason));
 }
 
-DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa(const char* reason)
-    : DisplaySleepDisabler(reason)
+SleepDisablerCocoa::SleepDisablerCocoa(const char* reason)
+    : SleepDisabler(reason)
     , m_disableDisplaySleepAssertion(0)
 {
     RetainPtr<CFStringRef> reasonCF = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, reason, kCFStringEncodingUTF8));
     IOPMAssertionCreateWithDescription(kIOPMAssertionTypePreventUserIdleDisplaySleep, reasonCF.get(), nullptr, nullptr, nullptr, 0, nullptr, &m_disableDisplaySleepAssertion);
 }
 
-DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa()
+SleepDisablerCocoa::~SleepDisablerCocoa()
 {
     IOPMAssertionRelease(m_disableDisplaySleepAssertion);
 }
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef DisplaySleepDisablerCocoa_h
-#define DisplaySleepDisablerCocoa_h
+#pragma once
 
 #if PLATFORM(COCOA)
 
-#include "DisplaySleepDisabler.h"
+#include "SleepDisabler.h"
 
 namespace WebCore {
 
-class DisplaySleepDisablerCocoa : public DisplaySleepDisabler {
+class SleepDisablerCocoa : public SleepDisabler {
 public:
-    DisplaySleepDisablerCocoa(const char*);
-    virtual ~DisplaySleepDisablerCocoa();
+    SleepDisablerCocoa(const char*);
+    virtual ~SleepDisablerCocoa();
 
 private:
     uint32_t m_disableDisplaySleepAssertion;
@@ -44,5 +43,3 @@ private:
 }
 
 #endif // PLATFORM(COCOA)
-
-#endif // DisplaySleepDisablerCocoa_h
index 013e046..cd516c5 100644 (file)
@@ -32,8 +32,8 @@
 #import <wtf/RefPtr.h>
 
 namespace WebCore {
-    class DisplaySleepDisabler;
-    class HTMLVideoElement;
+class SleepDisabler;
+class HTMLVideoElement;
 }
 
 @protocol WebVideoFullscreenControllerDelegate;
@@ -54,7 +54,7 @@ WEBCORE_EXPORT @interface WebVideoFullscreenController : NSWindowController {
     BOOL _isEndingFullscreen;
     BOOL _forceDisableAnimation;
 
-    std::unique_ptr<WebCore::DisplaySleepDisabler> _displaySleepDisabler;
+    std::unique_ptr<WebCore::SleepDisabler> _displaySleepDisabler;
 }
 
 - (id <WebVideoFullscreenControllerDelegate>)delegate;
index 699a369..6257917 100644 (file)
@@ -33,8 +33,8 @@
 #import "WebWindowAnimation.h"
 #import <AVFoundation/AVPlayerLayer.h>
 #import <Carbon/Carbon.h>
-#import <WebCore/DisplaySleepDisabler.h>
 #import <WebCore/HTMLVideoElement.h>
+#import <WebCore/SleepDisabler.h>
 #import <WebCore/SoftLinking.h>
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
@@ -362,7 +362,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
     
     if (rate && !_isEndingFullscreen) {
         if (!_displaySleepDisabler)
-            _displaySleepDisabler = DisplaySleepDisabler::create("com.apple.WebCore - Fullscreen video");
+            _displaySleepDisabler = SleepDisabler::create("com.apple.WebCore - Fullscreen video");
     } else
 #endif
         _displaySleepDisabler = nullptr;
index 3cd6dd5..d0937a6 100644 (file)
@@ -1,3 +1,12 @@
+2017-05-24  Jer Noble  <jer.noble@apple.com>
+
+        Rename DisplaySleepDisabler -> SleepDisabler
+        https://bugs.webkit.org/show_bug.cgi?id=172478
+
+        Reviewed by Sam Weinig.
+
+        * WebView/WebFullScreenController.h:
+
 2017-05-23  Simon Fraser  <simon.fraser@apple.com>
 
         Stop consulting -viewsNeedDisplay when doing layer flushing in WebKit1
index 60d96e8..58cacdd 100644 (file)
 @class WebWindowScaleAnimation;
 @class WebView;
 namespace WebCore {
-    class DisplaySleepDisabler;
-    class Element;
-    class RenderBox;
-    class EventListener;
+class SleepDisabler;
+class Element;
+class RenderBox;
+class EventListener;
 }
 
 @interface WebFullScreenController : NSWindowController {
index 4163e0a..08d8eee 100644 (file)
@@ -1,3 +1,13 @@
+2017-05-24  Jer Noble  <jer.noble@apple.com>
+
+        Rename DisplaySleepDisabler -> SleepDisabler
+        https://bugs.webkit.org/show_bug.cgi?id=172478
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/mac/WKFullScreenWindowController.h:
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+
 2017-05-23  John Wilander  <wilander@apple.com>
 
         Resource Load Statistics: Don't include HSTS cache data in website data removal
index 34ecbb0..6135791 100644 (file)
@@ -34,7 +34,7 @@ class WebPageProxy;
 }
 
 namespace WebCore {
-class DisplaySleepDisabler;
+class SleepDisabler;
 class IntRect;
 }
 
index f3765b5..3753799 100644 (file)
 #import "WebFullScreenManagerProxy.h"
 #import "WebPageProxy.h"
 #import <QuartzCore/QuartzCore.h>
-#import <WebCore/DisplaySleepDisabler.h>
 #import <WebCore/FloatRect.h>
 #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 <wtf/BlockObjCExceptions.h>