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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp

Issue 2814703002: Media Controls: move time display elements to media_controls module. (Closed)
Patch Set: review comments Created 3 years, 8 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/modules/media_controls/MediaControlsImpl.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
index 372ad0ebc0f9b8686da09ad53c5bef131ddb3ba4..46f1f6f2a4d238c5f6729a9a537bb81c2b7fbd85 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
@@ -46,9 +46,11 @@
#include "modules/media_controls/MediaControlsMediaEventListener.h"
#include "modules/media_controls/MediaControlsOrientationLockDelegate.h"
#include "modules/media_controls/MediaControlsWindowEventListener.h"
+#include "modules/media_controls/elements/MediaControlCurrentTimeDisplayElement.h"
#include "modules/media_controls/elements/MediaControlMuteButtonElement.h"
#include "modules/media_controls/elements/MediaControlOverlayEnclosureElement.h"
#include "modules/media_controls/elements/MediaControlPanelEnclosureElement.h"
+#include "modules/media_controls/elements/MediaControlRemainingTimeDisplayElement.h"
#include "platform/EventDispatchForbiddenScope.h"
namespace blink {
@@ -269,7 +271,7 @@ MediaControlsImpl* MediaControlsImpl::Create(HTMLMediaElement& media_element,
// | (-webkit-media-controls-play-button)
// +-MediaControlCurrentTimeDisplayElement
// | (-webkit-media-controls-current-time-display)
-// +-MediaControlTimeRemainingDisplayElement
+// +-MediaControlRemainingTimeDisplayElement
// | (-webkit-media-controls-time-remaining-display)
// +-MediaControlTimelineElement
// | (-webkit-media-controls-timeline)
@@ -324,16 +326,12 @@ void MediaControlsImpl::InitializeControls() {
play_button_ = play_button;
panel->AppendChild(play_button);
- MediaControlCurrentTimeDisplayElement* current_time_display =
- MediaControlCurrentTimeDisplayElement::Create(*this);
- current_time_display_ = current_time_display;
+ current_time_display_ = new MediaControlCurrentTimeDisplayElement(*this);
current_time_display_->SetIsWanted(true);
- panel->AppendChild(current_time_display);
+ panel->AppendChild(current_time_display_);
- MediaControlTimeRemainingDisplayElement* duration_display =
- MediaControlTimeRemainingDisplayElement::Create(*this);
- duration_display_ = duration_display;
- panel->AppendChild(duration_display);
+ duration_display_ = new MediaControlRemainingTimeDisplayElement(*this);
+ panel->AppendChild(duration_display_);
MediaControlTimelineElement* timeline =
MediaControlTimelineElement::Create(*this);

Powered by Google App Engine
This is Rietveld 408576698