Indicate we are processing user gesture when handling messages from WebPlaybackSessio...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 17:29:23 +0000 (17:29 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Apr 2016 17:29:23 +0000 (17:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157151

Reviewed by Jer Noble.

Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
user actions, so add a UserGestureIndicator in the methods that handle those messages.

* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::play):
(WebKit::WebPlaybackSessionManager::pause):
(WebKit::WebPlaybackSessionManager::togglePlayState):
(WebKit::WebPlaybackSessionManager::beginScrubbing):
(WebKit::WebPlaybackSessionManager::endScrubbing):
(WebKit::WebPlaybackSessionManager::seekToTime):
(WebKit::WebPlaybackSessionManager::fastSeek):
(WebKit::WebPlaybackSessionManager::beginScanningForward):
(WebKit::WebPlaybackSessionManager::beginScanningBackward):
(WebKit::WebPlaybackSessionManager::endScanning):
(WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
(WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm

index 6933158..b167700 100644 (file)
@@ -1,3 +1,27 @@
+2016-04-28  Ada Chan  <adachan@apple.com>
+
+        Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
+        https://bugs.webkit.org/show_bug.cgi?id=157151
+
+        Reviewed by Jer Noble.
+
+        Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
+        user actions, so add a UserGestureIndicator in the methods that handle those messages.
+
+        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
+        (WebKit::WebPlaybackSessionManager::play):
+        (WebKit::WebPlaybackSessionManager::pause):
+        (WebKit::WebPlaybackSessionManager::togglePlayState):
+        (WebKit::WebPlaybackSessionManager::beginScrubbing):
+        (WebKit::WebPlaybackSessionManager::endScrubbing):
+        (WebKit::WebPlaybackSessionManager::seekToTime):
+        (WebKit::WebPlaybackSessionManager::fastSeek):
+        (WebKit::WebPlaybackSessionManager::beginScanningForward):
+        (WebKit::WebPlaybackSessionManager::beginScanningBackward):
+        (WebKit::WebPlaybackSessionManager::endScanning):
+        (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
+        (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
+
 2016-04-29  Brady Eidson  <beidson@apple.com>
 
         Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup.
index 6bea566..717f31a 100644 (file)
@@ -41,6 +41,7 @@
 #import <WebCore/HTMLMediaElement.h>
 #import <WebCore/Settings.h>
 #import <WebCore/TimeRanges.h>
+#import <WebCore/UserGestureIndicator.h>
 #import <mach/mach_port.h>
 
 using namespace WebCore;
@@ -348,61 +349,73 @@ void WebPlaybackSessionManager::setWirelessVideoPlaybackDisabled(uint64_t contex
 
 void WebPlaybackSessionManager::play(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).play();
 }
 
 void WebPlaybackSessionManager::pause(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).pause();
 }
 
 void WebPlaybackSessionManager::togglePlayState(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).togglePlayState();
 }
 
 void WebPlaybackSessionManager::beginScrubbing(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).beginScrubbing();
 }
 
 void WebPlaybackSessionManager::endScrubbing(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).endScrubbing();
 }
 
 void WebPlaybackSessionManager::seekToTime(uint64_t contextId, double time)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).seekToTime(time);
 }
 
 void WebPlaybackSessionManager::fastSeek(uint64_t contextId, double time)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).fastSeek(time);
 }
 
 void WebPlaybackSessionManager::beginScanningForward(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).beginScanningForward();
 }
 
 void WebPlaybackSessionManager::beginScanningBackward(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).beginScanningBackward();
 }
 
 void WebPlaybackSessionManager::endScanning(uint64_t contextId)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).endScanning();
 }
 
 void WebPlaybackSessionManager::selectAudioMediaOption(uint64_t contextId, uint64_t index)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).selectAudioMediaOption(index);
 }
 
 void WebPlaybackSessionManager::selectLegibleMediaOption(uint64_t contextId, uint64_t index)
 {
+    UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     ensureModel(contextId).selectLegibleMediaOption(index);
 }