| Index: third_party/WebKit/Source/modules/media_controls/elements/MediaControlButtonPromoElements.cpp
|
| diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlButtonPromoElements.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlButtonPromoElements.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f80e8aafd006944a39f221aaf952587450c81a77
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlButtonPromoElements.cpp
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/media_controls/elements/MediaControlButtonPromoElements.h"
|
| +
|
| +#include "modules/media_controls/MediaControlsImpl.h"
|
| +#include "platform/text/PlatformLocale.h"
|
| +
|
| +namespace blink {
|
| +
|
| +MediaControlButtonPromoAnimation::MediaControlButtonPromoAnimation(
|
| + MediaControlsImpl& controls)
|
| + : MediaControlDivElement(controls, kMediaButtonPromoAnimation) {
|
| + SetShadowPseudoId(AtomicString("-internal-media-controls-promo-animation"));
|
| +}
|
| +
|
| +MediaControlButtonPromoArrow::MediaControlButtonPromoArrow(
|
| + MediaControlsImpl& controls)
|
| + : MediaControlDivElement(controls, kMediaButtonPromoArrow) {
|
| + SetShadowPseudoId(AtomicString("-internal-media-controls-promo-arrow"));
|
| +}
|
| +
|
| +MediaControlButtonPromoText::MediaControlButtonPromoText(
|
| + MediaControlsImpl& controls,
|
| + MediaControlElementType type,
|
| + WebLocalizedString::Name name)
|
| + : MediaControlDivElement(controls, type) {
|
| + SetShadowPseudoId(AtomicString("-internal-media-controls-promo-text"));
|
| + setTextContent(GetDocument()
|
| + .GetCachedLocale(GetDocument().ContentLanguage())
|
| + .QueryString(name));
|
| +}
|
| +
|
| +MediaControlButtonPromoContainer::MediaControlButtonPromoContainer(
|
| + MediaControlsImpl& controls,
|
| + MediaControlElementType button_type,
|
| + WebLocalizedString::Name promo_text)
|
| + : MediaControlDivElement(controls, kMediaButtonPromoContainer) {
|
| + SetShadowPseudoId(AtomicString("-internal-media-controls-promo-container"));
|
| +
|
| + animation_ = new MediaControlButtonPromoAnimation(controls);
|
| + AppendChild(animation_);
|
| + arrow_ = new MediaControlButtonPromoArrow(controls);
|
| + AppendChild(arrow_);
|
| + text_ = new MediaControlButtonPromoText(controls, button_type, promo_text);
|
| + AppendChild(text_);
|
| +}
|
| +
|
| +DEFINE_TRACE(MediaControlButtonPromoContainer) {
|
| + visitor->Trace(animation_);
|
| + visitor->Trace(arrow_);
|
| + visitor->Trace(text_);
|
| + MediaControlDivElement::Trace(visitor);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|