Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 1373423003: Remove MediaController (already diabled by REF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update web-platform-tests expectations Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index 85305738229ad20424e9be9fd690ea9ecc0be305..ab6d1484d6c2745d87b7cf773b5775d974c2d41b 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -33,7 +33,6 @@
#include "core/events/MouseEvent.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
-#include "core/html/MediaController.h"
#include "core/html/track/TextTrackContainer.h"
#include "core/layout/LayoutTheme.h"
@@ -379,9 +378,9 @@ void MediaControls::updatePlayState()
void MediaControls::beginScrubbing()
{
- if (!mediaElement().togglePlayStateWillPlay()) {
+ if (!mediaElement().paused()) {
m_isPausedForScrubbing = true;
- mediaElement().togglePlayState();
+ mediaElement().pause();
}
}
@@ -389,8 +388,8 @@ void MediaControls::endScrubbing()
{
if (m_isPausedForScrubbing) {
m_isPausedForScrubbing = false;
- if (mediaElement().togglePlayStateWillPlay())
- mediaElement().togglePlayState();
+ if (mediaElement().paused())
+ mediaElement().play();
}
}
@@ -547,7 +546,7 @@ void MediaControls::defaultEventHandler(Event* event)
if (event->type() == EventTypeNames::mouseover) {
if (!containsRelatedTarget(event)) {
m_isMouseOverControls = true;
- if (!mediaElement().togglePlayStateWillPlay()) {
+ if (!mediaElement().paused()) {
makeOpaque();
if (shouldHideMediaControls())
startHideMediaControlsTimer();
@@ -580,7 +579,7 @@ void MediaControls::hideMediaControlsTimerFired(Timer<MediaControls>*)
unsigned behaviorFlags = m_hideTimerBehaviorFlags | IgnoreFocus | IgnoreVideoHover;
m_hideTimerBehaviorFlags = IgnoreNone;
- if (mediaElement().togglePlayStateWillPlay())
+ if (mediaElement().paused())
return;
if (!shouldHideMediaControls(behaviorFlags))

Powered by Google App Engine
This is Rietveld 408576698