Source/WebCore:
[WebKit-https.git] / Source / WebKit2 / WebProcess / cocoa / WebPlaybackSessionManager.mm
index c96120728336f53736e31785735443c58d08cf0f..28c7ee9c8079b88f2cc6bca9b29a5c4ade164349 100644 (file)
@@ -149,6 +149,12 @@ void WebPlaybackSessionInterfaceContext::wirelessVideoPlaybackDisabledChanged(bo
         m_manager->wirelessVideoPlaybackDisabledChanged(m_contextId, disabled);
 }
 
         m_manager->wirelessVideoPlaybackDisabledChanged(m_contextId, disabled);
 }
 
+void WebPlaybackSessionInterfaceContext::mutedChanged(bool muted)
+{
+    if (m_manager)
+        m_manager->mutedChanged(m_contextId, muted);
+}
+
 #pragma mark - WebPlaybackSessionManager
 
 Ref<WebPlaybackSessionManager> WebPlaybackSessionManager::create(WebPage& page)
 #pragma mark - WebPlaybackSessionManager
 
 Ref<WebPlaybackSessionManager> WebPlaybackSessionManager::create(WebPage& page)
@@ -358,6 +364,11 @@ void WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged(uint64_t co
     m_page->send(Messages::WebPlaybackSessionManagerProxy::SetWirelessVideoPlaybackDisabled(contextId, disabled));
 }
 
     m_page->send(Messages::WebPlaybackSessionManagerProxy::SetWirelessVideoPlaybackDisabled(contextId, disabled));
 }
 
+void WebPlaybackSessionManager::mutedChanged(uint64_t contextId, bool muted)
+{
+    m_page->send(Messages::WebPlaybackSessionManagerProxy::SetMuted(contextId, muted));
+}
+
 #pragma mark Messages from WebPlaybackSessionManagerProxy:
 
 void WebPlaybackSessionManager::play(uint64_t contextId)
 #pragma mark Messages from WebPlaybackSessionManagerProxy:
 
 void WebPlaybackSessionManager::play(uint64_t contextId)
@@ -445,6 +456,12 @@ void WebPlaybackSessionManager::togglePictureInPicture(uint64_t contextId)
     ensureModel(contextId).togglePictureInPicture();
 }
 
     ensureModel(contextId).togglePictureInPicture();
 }
 
+void WebPlaybackSessionManager::toggleMuted(uint64_t contextId)
+{
+    UserGestureIndicator indicator(ProcessingUserGesture);
+    ensureModel(contextId).toggleMuted();
+}
+
 } // namespace WebKit
 
 #endif // PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 } // namespace WebKit
 
 #endif // PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))