Commit 65008aff authored by mark a. foltz's avatar mark a. foltz Committed by Commit Bot

[Media Router] Remove MediaStatus.description

Remove remaining usages of MediaStatus.description field.  It is no longer used
in the UI or in the extension in M67+.

Bug: 786208
Change-Id: I19269d3a317be05765773c53b906aa75277b0407
Reviewed-on: https://chromium-review.googlesource.com/956743Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDerek Cheng <imcheng@chromium.org>
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542237}
parent 61bdd884
...@@ -20,7 +20,7 @@ MediaStatus::~MediaStatus() = default; ...@@ -20,7 +20,7 @@ MediaStatus::~MediaStatus() = default;
MediaStatus& MediaStatus::operator=(const MediaStatus& other) = default; MediaStatus& MediaStatus::operator=(const MediaStatus& other) = default;
bool MediaStatus::operator==(const MediaStatus& other) const { bool MediaStatus::operator==(const MediaStatus& other) const {
return title == other.title && description == other.description && return title == other.title &&
can_play_pause == other.can_play_pause && can_mute == other.can_mute && can_play_pause == other.can_play_pause && can_mute == other.can_mute &&
can_set_volume == other.can_set_volume && can_seek == other.can_seek && can_set_volume == other.can_set_volume && can_seek == other.can_seek &&
play_state == other.play_state && is_muted == other.is_muted && play_state == other.play_state && is_muted == other.is_muted &&
......
...@@ -43,12 +43,6 @@ struct MediaStatus { ...@@ -43,12 +43,6 @@ struct MediaStatus {
// a YouTube Cast session, this could be the title of the video. // a YouTube Cast session, this could be the title of the video.
std::string title; std::string title;
// Text describing the media, or a secondary title. For example, in a
// MediaStatus representing a YouTube Cast session, this could be "YouTube".
//
// DEPRECATED. TODO(crbug.com/786208): Remove this when no longer used.
std::string description;
// If this is true, the media can be played and paused. // If this is true, the media can be played and paused.
bool can_play_pause = false; bool can_play_pause = false;
......
...@@ -22,15 +22,6 @@ struct MediaStatus { ...@@ -22,15 +22,6 @@ struct MediaStatus {
// For a Presentation API route, it is the presentation page title. // For a Presentation API route, it is the presentation page title.
string title; string title;
// Text describing the media, or a secondary title. For example, in a
// MediaStatus representing a YouTube Cast session, this could be "YouTube".
//
// DEPRECATED. This is used to override MediaRoute.description (defined in
// media_router.mojom) in the Media Router UX. We will be using
// MediaRoute.description exclusively once all MRPs have been updated.
// TODO(crbug.com/786208): Remove this when that is done.
string description;
// If this is true, the media can be played and paused through its // If this is true, the media can be played and paused through its
// MediaController. // MediaController.
bool can_play_pause; bool can_play_pause;
......
...@@ -17,11 +17,6 @@ bool StructTraits<media_router::mojom::MediaStatusDataView, ...@@ -17,11 +17,6 @@ bool StructTraits<media_router::mojom::MediaStatusDataView,
if (!data.ReadTitle(&out->title) || !base::IsStringUTF8(out->title)) if (!data.ReadTitle(&out->title) || !base::IsStringUTF8(out->title))
return false; return false;
if (!data.ReadDescription(&out->description) ||
!base::IsStringUTF8(out->description)) {
return false;
}
out->can_play_pause = data.can_play_pause(); out->can_play_pause = data.can_play_pause();
out->can_mute = data.can_mute(); out->can_mute = data.can_mute();
out->can_set_volume = data.can_set_volume(); out->can_set_volume = data.can_set_volume();
......
...@@ -58,11 +58,6 @@ struct StructTraits<media_router::mojom::MediaStatusDataView, ...@@ -58,11 +58,6 @@ struct StructTraits<media_router::mojom::MediaStatusDataView,
return status.title; return status.title;
} }
static const std::string& description(
const media_router::MediaStatus& status) {
return status.description;
}
static bool can_play_pause(const media_router::MediaStatus& status) { static bool can_play_pause(const media_router::MediaStatus& status) {
return status.can_play_pause; return status.can_play_pause;
} }
......
...@@ -160,7 +160,6 @@ IPEndpointAdapter.prototype.toNewVersion = function() { ...@@ -160,7 +160,6 @@ IPEndpointAdapter.prototype.toNewVersion = function() {
*/ */
function MediaStatusAdapter(fields) { function MediaStatusAdapter(fields) {
this.title = null; this.title = null;
this.description = null;
this.can_play_pause = false; this.can_play_pause = false;
this.can_mute = false; this.can_mute = false;
this.can_set_volume = false; this.can_set_volume = false;
...@@ -180,7 +179,6 @@ MediaStatusAdapter.PlayState = mediaRouter.mojom.MediaStatus.PlayState; ...@@ -180,7 +179,6 @@ MediaStatusAdapter.PlayState = mediaRouter.mojom.MediaStatus.PlayState;
MediaStatusAdapter.prototype.toNewVersion = function() { MediaStatusAdapter.prototype.toNewVersion = function() {
return new mediaRouter.mojom.MediaStatus({ return new mediaRouter.mojom.MediaStatus({
'title': this.title, 'title': this.title,
'description': this.description,
'canPlayPause': this.can_play_pause, 'canPlayPause': this.can_play_pause,
'canMute': this.can_mute, 'canMute': this.can_mute,
'canSetVolume': this.can_set_volume, 'canSetVolume': this.can_set_volume,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment