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

Unified Diff: Source/core/html/MediaController.cpp

Issue 334593005: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/core/html/TimeRanges.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaController.cpp
diff --git a/Source/core/html/MediaController.cpp b/Source/core/html/MediaController.cpp
index 0f2e3f33de9d09660f44e989f6fc248865c68223..0e473d20132345e94e822a60516378810e099bea 100644
--- a/Source/core/html/MediaController.cpp
+++ b/Source/core/html/MediaController.cpp
@@ -38,8 +38,6 @@
#include "wtf/StdLibExtras.h"
#include "wtf/text/AtomicString.h"
-using namespace std;
-
namespace WebCore {
PassRefPtrWillBeRawPtr<MediaController> MediaController::create(ExecutionContext* context)
@@ -139,7 +137,7 @@ double MediaController::duration() const
double duration = (*it)->duration();
if (std::isnan(duration))
continue;
- maxDuration = max(maxDuration, duration);
+ maxDuration = std::max(maxDuration, duration);
}
return maxDuration;
}
@@ -151,7 +149,7 @@ double MediaController::currentTime() const
if (m_position == MediaPlayer::invalidTime()) {
// Some clocks may return times outside the range of [0..duration].
- m_position = max(0.0, min(duration(), m_clock->currentTime()));
+ m_position = std::max(0.0, std::min(duration(), m_clock->currentTime()));
m_clearPositionTimer.startOneShot(0, FROM_HERE);
}
@@ -163,11 +161,11 @@ void MediaController::setCurrentTime(double time, ExceptionState& exceptionState
// When the user agent is to seek the media controller to a particular new playback position,
// it must follow these steps:
// If the new playback position is less than zero, then set it to zero.
- time = max(0.0, time);
+ time = std::max(0.0, time);
// If the new playback position is greater than the media controller duration, then set it
// to the media controller duration.
- time = min(time, duration());
+ time = std::min(time, duration());
// Set the media controller position to the new playback position.
m_position = time;
@@ -364,7 +362,7 @@ void MediaController::updateReadyState()
MediaElementSequence::const_iterator it = m_mediaElements.begin();
newReadyState = (*it)->readyState();
for (++it; it != m_mediaElements.end(); ++it)
- newReadyState = min(newReadyState, (*it)->readyState());
+ newReadyState = std::min(newReadyState, (*it)->readyState());
}
if (newReadyState == oldReadyState)
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/core/html/TimeRanges.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698