Add stub implementation of WKPageIsPlayingAudio().
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Sep 2014 20:11:06 +0000 (20:11 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Sep 2014 20:11:06 +0000 (20:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137044

Reviewed by Anders Carlsson.

Also add an isPlayingAudioDidChange callback to WKPageUIClient.

* UIProcess/API/C/WKPage.cpp:
(WKPageIsPlayingAudio):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/C/WKPageUIClient.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
Source/WebKit2/UIProcess/API/C/WKPageUIClient.h

index ece56a8..fbfb8dc 100644 (file)
@@ -1,3 +1,17 @@
+2014-09-23  Ada Chan  <adachan@apple.com>
+
+        Add stub implementation of WKPageIsPlayingAudio().
+        https://bugs.webkit.org/show_bug.cgi?id=137044
+
+        Reviewed by Anders Carlsson.
+
+        Also add an isPlayingAudioDidChange callback to WKPageUIClient.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageIsPlayingAudio):
+        * UIProcess/API/C/WKPagePrivate.h:
+        * UIProcess/API/C/WKPageUIClient.h:
+
 2014-09-21  Timothy Hatcher  <timothy@apple.com>
 
         Make the Web Inspector use a separate web process.
index 3c006bc..b8b02cb 100644 (file)
@@ -1882,6 +1882,12 @@ void WKPageSetAddsVisitedLinks(WKPageRef page, bool addsVisitedLinks)
     toImpl(page)->setAddsVisitedLinks(addsVisitedLinks);
 }
 
+bool WKPageIsPlayingAudio(WKPageRef page)
+{
+    // FIXME: To be implemented (https://bugs.webkit.org/show_bug.cgi?id=137048).
+    return false;
+}
+
 void WKPageSetInvalidMessageFunction(WKPageInvalidMessageFunction)
 {
     // FIXME: Remove this function when doing so won't break WebKit nightlies.
index 3cb8858..77f4417 100644 (file)
@@ -114,6 +114,8 @@ WK_EXPORT void WKPageSetScrollPinningBehavior(WKPageRef page, WKScrollPinningBeh
 WK_EXPORT bool WKPageGetAddsVisitedLinks(WKPageRef page);
 WK_EXPORT void WKPageSetAddsVisitedLinks(WKPageRef page, bool visitedLinks);
 
+WK_EXPORT bool WKPageIsPlayingAudio(WKPageRef page);
+
 #ifdef __cplusplus
 }
 #endif
index 40377d6..bc9eec7 100644 (file)
@@ -89,6 +89,7 @@ typedef void (*WKPagePinnedStateDidChangeCallback)(WKPageRef page, const void* c
 typedef void (*WKPageDidBeginTrackingPotentialLongMousePressCallback)(WKPageRef page, WKPoint mouseDownPosition, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidRecognizeLongMousePressCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidCancelTrackingPotentialLongMousePressCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
+typedef void (*WKPageIsPlayingAudioDidChangeCallback)(WKPageRef page, const void* clientInfo);
 
 // Deprecated    
 typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV0)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
@@ -374,6 +375,7 @@ typedef struct WKPageUIClientV4 {
     WKPageDidBeginTrackingPotentialLongMousePressCallback               didBeginTrackingPotentialLongMousePress;
     WKPageDidRecognizeLongMousePressCallback                            didRecognizeLongMousePress;
     WKPageDidCancelTrackingPotentialLongMousePressCallback              didCancelTrackingPotentialLongMousePress;
+    WKPageIsPlayingAudioDidChangeCallback                               isPlayingAudioDidChange;
 } WKPageUIClientV4;
 
 enum { kWKPageUIClientCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 2 };