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

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

Issue 2830653002: Media Controls: move volume slider 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/MediaControlTimelineElement.h"
64 #include "modules/media_controls/elements/MediaControlToggleClosedCaptionsButton Element.h" 64 #include "modules/media_controls/elements/MediaControlToggleClosedCaptionsButton Element.h"
65 #include "modules/media_controls/elements/MediaControlVolumeSliderElement.h"
65 #include "platform/EventDispatchForbiddenScope.h" 66 #include "platform/EventDispatchForbiddenScope.h"
66 67
67 namespace blink { 68 namespace blink {
68 69
69 namespace { 70 namespace {
70 71
71 // TODO(steimel): should have better solution than hard-coding pixel values. 72 // TODO(steimel): should have better solution than hard-coding pixel values.
72 // Defined in core/css/mediaControls.css, core/css/mediaControlsAndroid.css, 73 // Defined in core/css/mediaControls.css, core/css/mediaControlsAndroid.css,
73 // and core/paint/MediaControlsPainter.cpp. 74 // and core/paint/MediaControlsPainter.cpp.
74 constexpr int kOverlayPlayButtonWidth = 48; 75 constexpr int kOverlayPlayButtonWidth = 48;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 338
338 duration_display_ = new MediaControlRemainingTimeDisplayElement(*this); 339 duration_display_ = new MediaControlRemainingTimeDisplayElement(*this);
339 panel_->AppendChild(duration_display_); 340 panel_->AppendChild(duration_display_);
340 341
341 timeline_ = new MediaControlTimelineElement(*this); 342 timeline_ = new MediaControlTimelineElement(*this);
342 panel_->AppendChild(timeline_); 343 panel_->AppendChild(timeline_);
343 344
344 mute_button_ = new MediaControlMuteButtonElement(*this); 345 mute_button_ = new MediaControlMuteButtonElement(*this);
345 panel_->AppendChild(mute_button_); 346 panel_->AppendChild(mute_button_);
346 347
347 MediaControlVolumeSliderElement* slider = 348 volume_slider_ = new MediaControlVolumeSliderElement(*this);
348 MediaControlVolumeSliderElement::Create(*this); 349 panel_->AppendChild(volume_slider_);
349 volume_slider_ = slider;
350 panel_->AppendChild(slider);
351 if (PreferHiddenVolumeControls(GetDocument())) 350 if (PreferHiddenVolumeControls(GetDocument()))
352 volume_slider_->SetIsWanted(false); 351 volume_slider_->SetIsWanted(false);
353 352
354 fullscreen_button_ = new MediaControlFullscreenButtonElement(*this); 353 fullscreen_button_ = new MediaControlFullscreenButtonElement(*this);
355 panel_->AppendChild(fullscreen_button_); 354 panel_->AppendChild(fullscreen_button_);
356 355
357 download_button_ = new MediaControlDownloadButtonElement(*this); 356 download_button_ = new MediaControlDownloadButtonElement(*this);
358 panel_->AppendChild(download_button_); 357 panel_->AppendChild(download_button_);
359 358
360 cast_button_ = new MediaControlCastButtonElement(*this, false); 359 cast_button_ = new MediaControlCastButtonElement(*this, false);
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 visitor->Trace(cast_button_); 1128 visitor->Trace(cast_button_);
1130 visitor->Trace(overlay_cast_button_); 1129 visitor->Trace(overlay_cast_button_);
1131 visitor->Trace(media_event_listener_); 1130 visitor->Trace(media_event_listener_);
1132 visitor->Trace(window_event_listener_); 1131 visitor->Trace(window_event_listener_);
1133 visitor->Trace(orientation_lock_delegate_); 1132 visitor->Trace(orientation_lock_delegate_);
1134 MediaControls::Trace(visitor); 1133 MediaControls::Trace(visitor);
1135 HTMLDivElement::Trace(visitor); 1134 HTMLDivElement::Trace(visitor);
1136 } 1135 }
1137 1136
1138 } // namespace blink 1137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698