Index: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h |
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h |
index b14b75ee7393b94fa1cd53d1c624dcd056cf169d..7cac17811707adb7429c490aebd92a93e678b702 100644 |
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h |
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h |
@@ -84,18 +84,6 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement, |
// HTMLTrackElement failed to load because there is no web exposed way to |
// be notified on the TextTrack object. See https://crbug.com/669977 |
void OnTrackElementFailedToLoad() override { OnTextTracksAddedOrRemoved(); } |
- // TODO(mlamouri): the following methods will be able to become private when |
- // the controls have to modules/ and have access to RemotePlayback. |
- void OnRemotePlaybackAvailabilityChanged() override { |
- RefreshCastButtonVisibility(); |
- } |
- void OnRemotePlaybackConnecting() override { StartedCasting(); } |
- void OnRemotePlaybackDisconnected() override { StoppedCasting(); } |
- // TODO(mlamouri): this method is needed in order to notify the controls that |
- // the attribute have changed. |
- void OnDisableRemotePlaybackAttributeChanged() override { |
- RefreshCastButtonVisibility(); |
- } |
// Notify us that the media element's network state has changed. |
void NetworkStateChanged() override; |
LayoutObject* PanelLayoutObject() override; |
@@ -151,6 +139,7 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement, |
// Need to be members of MediaControls for private member access. |
class BatchedControlUpdate; |
class MediaControlsResizeObserverCallback; |
+ class MediaElementMutationCallback; |
static MediaControlsImpl* Create(HTMLMediaElement&, ShadowRoot&); |
@@ -199,8 +188,7 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement, |
bool ContainsRelatedTarget(Event*); |
// Internal cast related methods. |
- void StartedCasting(); |
- void StoppedCasting(); |
+ void RemotePlaybackStateChanged(); |
void RefreshCastButtonVisibility(); |
void RefreshCastButtonVisibilityWithoutUpdate(); |
@@ -255,6 +243,10 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement, |
// necessary. |
Member<ResizeObserver> resize_observer_; |
+ // Watches the media element for attribute changes and updates media controls |
+ // as necessary. |
+ Member<MediaElementMutationCallback> element_mutation_callback_; |
+ |
TaskRunnerTimer<MediaControlsImpl> element_size_changed_timer_; |
IntSize size_; |