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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2782373002: Remove MediaControls methods needed for the Cast button (Closed)
Patch Set: Unified watch availability code. 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/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index d3e0fc4ebe09e239b56f59bda8002f00ea4d79a5..b99183e82872488493089e2e01812d267cd1ca2e 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3252,18 +3252,10 @@ void HTMLMediaElement::RemoteRouteAvailabilityChanged(
WebRemotePlaybackAvailability availability) {
if (RemotePlaybackClient())
RemotePlaybackClient()->AvailabilityChanged(availability);
-
- // TODO(mlamouri): the RemotePlayback object should be used in order to
- // register to watch availability but the object is in modules/ and core/ has
- // no access to it. It will have to be done when the media controls move to
- // modules/.
- if (GetMediaControls())
- GetMediaControls()->OnRemotePlaybackAvailabilityChanged();
}
bool HTMLMediaElement::HasRemoteRoutes() const {
- // TODO(mlamouri): this is only used for controls related code. It shouldn't
- // live in HTMLMediaElement.
+ // TODO(mlamouri): used by MediaControlsPainter; should be refactored out.
return RemotePlaybackClient() &&
RemotePlaybackClient()->RemotePlaybackAvailable();
}
@@ -3272,24 +3264,12 @@ void HTMLMediaElement::ConnectedToRemoteDevice() {
playing_remotely_ = true;
if (RemotePlaybackClient())
RemotePlaybackClient()->StateChanged(WebRemotePlaybackState::kConnecting);
-
- // TODO(mlamouri): the RemotePlayback object should be used in order to listen
- // for events but the object is in modules/ and core/ has no access to it. It
- // will have to be done when the media controls move to modules/.
- if (GetMediaControls())
- GetMediaControls()->OnRemotePlaybackConnecting();
}
void HTMLMediaElement::DisconnectedFromRemoteDevice() {
playing_remotely_ = false;
if (RemotePlaybackClient())
RemotePlaybackClient()->StateChanged(WebRemotePlaybackState::kDisconnected);
-
- // TODO(mlamouri): the RemotePlayback object should be used in order to listen
- // for events but the object is in modules/ and core/ has no access to it. It
- // will have to be done when the media controls move to modules/.
- if (GetMediaControls())
- GetMediaControls()->OnRemotePlaybackDisconnected();
}
void HTMLMediaElement::CancelledRemotePlaybackRequest() {

Powered by Google App Engine
This is Rietveld 408576698