Title: [138006] trunk/Source/WebCore
- Revision
- 138006
- Author
- [email protected]
- Date
- 2012-12-18 03:57:23 -0800 (Tue, 18 Dec 2012)
Log Message
[BlackBerry] Add support for setMuted() for media
https://bugs.webkit.org/show_bug.cgi?id=105254
Patch by Max Feil <[email protected]> on 2012-12-18
Reviewed by George Staikos.
Simply pass the API call through to the platform layer.
Covered by existing tests.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::setMuted):
(WebCore):
(WebCore::MediaPlayerPrivate::muted):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::supportsMuting):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138005 => 138006)
--- trunk/Source/WebCore/ChangeLog 2012-12-18 11:46:05 UTC (rev 138005)
+++ trunk/Source/WebCore/ChangeLog 2012-12-18 11:57:23 UTC (rev 138006)
@@ -1,3 +1,22 @@
+2012-12-18 Max Feil <[email protected]>
+
+ [BlackBerry] Add support for setMuted() for media
+ https://bugs.webkit.org/show_bug.cgi?id=105254
+
+ Reviewed by George Staikos.
+
+ Simply pass the API call through to the platform layer.
+
+ Covered by existing tests.
+
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+ (WebCore::MediaPlayerPrivate::setMuted):
+ (WebCore):
+ (WebCore::MediaPlayerPrivate::muted):
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
+ (MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::supportsMuting):
+
2012-12-18 Yury Semikhatsky <[email protected]>
Web Inspector: show cached images under MemoryCache -> Images section
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp (138005 => 138006)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-12-18 11:46:05 UTC (rev 138005)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-12-18 11:57:23 UTC (rev 138006)
@@ -130,9 +130,8 @@
if (m_isAuthenticationChallenging)
AuthenticationChallengeManager::instance()->cancelAuthenticationChallenge(this);
- if (isFullscreen()) {
+ if (isFullscreen())
m_webCorePlayer->mediaPlayerClient()->mediaPlayerExitFullscreen();
- }
#if USE(ACCELERATED_COMPOSITING)
// Remove media player from platform layer.
if (m_platformLayer)
@@ -315,6 +314,19 @@
m_platformPlayer->setVolume(volume);
}
+void MediaPlayerPrivate::setMuted(bool muted)
+{
+ if (m_platformPlayer)
+ m_platformPlayer->setMuted(muted);
+}
+
+bool MediaPlayerPrivate::muted() const
+{
+ if (m_platformPlayer)
+ return m_platformPlayer->muted();
+ return false;
+}
+
MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
{
return m_networkState;
@@ -719,9 +731,9 @@
ASSERT(url.isValid());
return ProtectionSpace(url.host(), url.port(),
- static_cast<ProtectionSpaceServerType>(authChallenge.serverType()),
- authChallenge.realm().c_str(),
- static_cast<ProtectionSpaceAuthenticationScheme>(authChallenge.authScheme()));
+ static_cast<ProtectionSpaceServerType>(authChallenge.serverType()),
+ authChallenge.realm().c_str(),
+ static_cast<ProtectionSpaceAuthenticationScheme>(authChallenge.authScheme()));
}
void MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge)
@@ -753,8 +765,8 @@
return;
m_platformPlayer->reloadWithCredential(credential.user().utf8(String::StrictConversion).data(),
- credential.password().utf8(String::StrictConversion).data(),
- static_cast<MMRAuthChallenge::CredentialPersistence>(credential.persistence()));
+ credential.password().utf8(String::StrictConversion).data(),
+ static_cast<MMRAuthChallenge::CredentialPersistence>(credential.persistence()));
}
void MediaPlayerPrivate::onAuthenticationAccepted(const MMRAuthChallenge& authChallenge) const
@@ -933,9 +945,9 @@
}
}
-static unsigned int allocateTextureId()
+static unsigned allocateTextureId()
{
- unsigned int texid;
+ unsigned texid;
glGenTextures(1, &texid);
glBindTexture(GL_TEXTURE_2D, texid);
// Do basic linear filtering on resize.
@@ -958,7 +970,7 @@
renderMatrix.rotate(time.tv_nsec / 1000000000.0 * 360.0);
static bool initialized = false;
- static unsigned int texId = allocateTextureId();
+ static unsigned texId = allocateTextureId();
glBindTexture(GL_TEXTURE_2D, texId);
if (!initialized) {
initialized = true;
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h (138005 => 138006)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-12-18 11:46:05 UTC (rev 138005)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-12-18 11:57:23 UTC (rev 138006)
@@ -79,8 +79,11 @@
virtual void setRate(float);
virtual bool paused() const;
+ virtual bool muted() const;
+ virtual bool supportsMuting() const { return true; }
virtual void setVolume(float);
+ virtual void setMuted(bool);
virtual MediaPlayer::NetworkState networkState() const;
virtual MediaPlayer::ReadyState readyState() const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes