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

Side by Side Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp

Issue 2820343002: Media Controls: move timeline related code to modules. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "modules/media_controls/elements/MediaControlMuteButtonElement.h" 53 #include "modules/media_controls/elements/MediaControlMuteButtonElement.h"
54 #include "modules/media_controls/elements/MediaControlOverflowMenuButtonElement. h" 54 #include "modules/media_controls/elements/MediaControlOverflowMenuButtonElement. h"
55 #include "modules/media_controls/elements/MediaControlOverflowMenuListElement.h" 55 #include "modules/media_controls/elements/MediaControlOverflowMenuListElement.h"
56 #include "modules/media_controls/elements/MediaControlOverlayEnclosureElement.h" 56 #include "modules/media_controls/elements/MediaControlOverlayEnclosureElement.h"
57 #include "modules/media_controls/elements/MediaControlOverlayPlayButtonElement.h " 57 #include "modules/media_controls/elements/MediaControlOverlayPlayButtonElement.h "
58 #include "modules/media_controls/elements/MediaControlPanelElement.h" 58 #include "modules/media_controls/elements/MediaControlPanelElement.h"
59 #include "modules/media_controls/elements/MediaControlPanelEnclosureElement.h" 59 #include "modules/media_controls/elements/MediaControlPanelEnclosureElement.h"
60 #include "modules/media_controls/elements/MediaControlPlayButtonElement.h" 60 #include "modules/media_controls/elements/MediaControlPlayButtonElement.h"
61 #include "modules/media_controls/elements/MediaControlRemainingTimeDisplayElemen t.h" 61 #include "modules/media_controls/elements/MediaControlRemainingTimeDisplayElemen t.h"
62 #include "modules/media_controls/elements/MediaControlTextTrackListElement.h" 62 #include "modules/media_controls/elements/MediaControlTextTrackListElement.h"
63 #include "modules/media_controls/elements/MediaControlTimelineElement.h"
63 #include "modules/media_controls/elements/MediaControlToggleClosedCaptionsButton Element.h" 64 #include "modules/media_controls/elements/MediaControlToggleClosedCaptionsButton Element.h"
64 #include "platform/EventDispatchForbiddenScope.h" 65 #include "platform/EventDispatchForbiddenScope.h"
65 66
66 namespace blink { 67 namespace blink {
67 68
68 namespace { 69 namespace {
69 70
70 // TODO(steimel): should have better solution than hard-coding pixel values. 71 // TODO(steimel): should have better solution than hard-coding pixel values.
71 // Defined in core/css/mediaControls.css, core/css/mediaControlsAndroid.css, 72 // Defined in core/css/mediaControls.css, core/css/mediaControlsAndroid.css,
72 // and core/paint/MediaControlsPainter.cpp. 73 // and core/paint/MediaControlsPainter.cpp.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 play_button_ = new MediaControlPlayButtonElement(*this); 331 play_button_ = new MediaControlPlayButtonElement(*this);
331 panel_->AppendChild(play_button_); 332 panel_->AppendChild(play_button_);
332 333
333 current_time_display_ = new MediaControlCurrentTimeDisplayElement(*this); 334 current_time_display_ = new MediaControlCurrentTimeDisplayElement(*this);
334 current_time_display_->SetIsWanted(true); 335 current_time_display_->SetIsWanted(true);
335 panel_->AppendChild(current_time_display_); 336 panel_->AppendChild(current_time_display_);
336 337
337 duration_display_ = new MediaControlRemainingTimeDisplayElement(*this); 338 duration_display_ = new MediaControlRemainingTimeDisplayElement(*this);
338 panel_->AppendChild(duration_display_); 339 panel_->AppendChild(duration_display_);
339 340
340 MediaControlTimelineElement* timeline = 341 timeline_ = new MediaControlTimelineElement(*this);
341 MediaControlTimelineElement::Create(*this); 342 panel_->AppendChild(timeline_);
342 timeline_ = timeline;
343 panel_->AppendChild(timeline);
344 343
345 mute_button_ = new MediaControlMuteButtonElement(*this); 344 mute_button_ = new MediaControlMuteButtonElement(*this);
346 panel_->AppendChild(mute_button_); 345 panel_->AppendChild(mute_button_);
347 346
348 MediaControlVolumeSliderElement* slider = 347 MediaControlVolumeSliderElement* slider =
349 MediaControlVolumeSliderElement::Create(*this); 348 MediaControlVolumeSliderElement::Create(*this);
350 volume_slider_ = slider; 349 volume_slider_ = slider;
351 panel_->AppendChild(slider); 350 panel_->AppendChild(slider);
352 if (PreferHiddenVolumeControls(GetDocument())) 351 if (PreferHiddenVolumeControls(GetDocument()))
353 volume_slider_->SetIsWanted(false); 352 volume_slider_->SetIsWanted(false);
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 visitor->Trace(cast_button_); 1129 visitor->Trace(cast_button_);
1131 visitor->Trace(overlay_cast_button_); 1130 visitor->Trace(overlay_cast_button_);
1132 visitor->Trace(media_event_listener_); 1131 visitor->Trace(media_event_listener_);
1133 visitor->Trace(window_event_listener_); 1132 visitor->Trace(window_event_listener_);
1134 visitor->Trace(orientation_lock_delegate_); 1133 visitor->Trace(orientation_lock_delegate_);
1135 MediaControls::Trace(visitor); 1134 MediaControls::Trace(visitor);
1136 HTMLDivElement::Trace(visitor); 1135 HTMLDivElement::Trace(visitor);
1137 } 1136 }
1138 1137
1139 } // namespace blink 1138 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698