Commit b9f97f80 authored by Takumi Fujimoto's avatar Takumi Fujimoto Committed by Commit Bot

[Media Router] Add EDUCATION to MediaSink icon types

Adds Cast for Education as a possible MediaSink icon type. This will be a no-op until the component extension supports the icon type.

Bug: 681048
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ie61c80887956709ca88b52ae45894bf521ee938a
Reviewed-on: https://chromium-review.googlesource.com/577981
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Reviewed-by: default avatarJennifer Apacible <apacible@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488509}
parent b9da88b5
...@@ -949,16 +949,18 @@ Polymer({ ...@@ -949,16 +949,18 @@ Polymer({
switch (sink.iconType) { switch (sink.iconType) {
case media_router.SinkIconType.CAST: case media_router.SinkIconType.CAST:
return 'media-router:chromecast'; return 'media-router:chromecast';
case media_router.SinkIconType.CAST_AUDIO:
return 'media-router:speaker';
case media_router.SinkIconType.CAST_AUDIO_GROUP: case media_router.SinkIconType.CAST_AUDIO_GROUP:
return 'media-router:speaker-group'; return 'media-router:speaker-group';
case media_router.SinkIconType.GENERIC: case media_router.SinkIconType.CAST_AUDIO:
return 'media-router:tv'; return 'media-router:speaker';
case media_router.SinkIconType.HANGOUT:
return 'media-router:hangout';
case media_router.SinkIconType.MEETING: case media_router.SinkIconType.MEETING:
return 'media-router:meeting'; return 'media-router:meeting';
case media_router.SinkIconType.HANGOUT:
return 'media-router:hangout';
case media_router.SinkIconType.EDUCATION:
return 'media-router:education';
case media_router.SinkIconType.GENERIC:
return 'media-router:tv';
default: default:
return 'media-router:tv'; return 'media-router:tv';
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<!-- Icons below are swapped out in branded builds. --> <!-- Icons below are swapped out in branded builds. -->
<!-- copy of third_party/polymer/v1_0/components-chromium/iron-icons/hardware-icons.html hardware:tv icon --> <!-- copy of third_party/polymer/v1_0/components-chromium/iron-icons/hardware-icons.html hardware:tv icon -->
<g id="chromecast"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"></path></g> <g id="chromecast"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"></path></g>
<g id="education"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"></path></g>
<!-- copy of third_party/polymer/v1_0/components-chromium/iron-icons/hardware-icons.html communication:message icon --> <!-- copy of third_party/polymer/v1_0/components-chromium/iron-icons/hardware-icons.html communication:message icon -->
<g id="hangout"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></g> <g id="hangout"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></g>
<g id="meeting"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></g> <g id="meeting"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></g>
......
...@@ -106,7 +106,8 @@ media_router.SinkIconType = { ...@@ -106,7 +106,8 @@ media_router.SinkIconType = {
CAST_AUDIO: 2, CAST_AUDIO: 2,
MEETING: 3, MEETING: 3,
HANGOUT: 4, HANGOUT: 4,
GENERIC: 5, EDUCATION: 5,
GENERIC: 6,
}; };
/** /**
......
...@@ -25,6 +25,7 @@ enum SinkIconType { ...@@ -25,6 +25,7 @@ enum SinkIconType {
CAST_AUDIO, CAST_AUDIO,
MEETING, MEETING,
HANGOUT, HANGOUT,
EDUCATION,
GENERIC GENERIC
}; };
......
...@@ -14,10 +14,11 @@ import "url/mojo/url.mojom"; ...@@ -14,10 +14,11 @@ import "url/mojo/url.mojom";
enum SinkIconType { enum SinkIconType {
CAST, CAST,
CAST_AUDIO,
CAST_AUDIO_GROUP, CAST_AUDIO_GROUP,
CAST_AUDIO,
MEETING, MEETING,
HANGOUT, HANGOUT,
EDUCATION,
GENERIC GENERIC
}; };
......
...@@ -255,14 +255,16 @@ struct EnumTraits<media_router::mojom::SinkIconType, ...@@ -255,14 +255,16 @@ struct EnumTraits<media_router::mojom::SinkIconType,
switch (icon_type) { switch (icon_type) {
case media_router::SinkIconType::CAST: case media_router::SinkIconType::CAST:
return media_router::mojom::SinkIconType::CAST; return media_router::mojom::SinkIconType::CAST;
case media_router::SinkIconType::CAST_AUDIO:
return media_router::mojom::SinkIconType::CAST_AUDIO;
case media_router::SinkIconType::CAST_AUDIO_GROUP: case media_router::SinkIconType::CAST_AUDIO_GROUP:
return media_router::mojom::SinkIconType::CAST_AUDIO_GROUP; return media_router::mojom::SinkIconType::CAST_AUDIO_GROUP;
case media_router::SinkIconType::HANGOUT: case media_router::SinkIconType::CAST_AUDIO:
return media_router::mojom::SinkIconType::HANGOUT; return media_router::mojom::SinkIconType::CAST_AUDIO;
case media_router::SinkIconType::MEETING: case media_router::SinkIconType::MEETING:
return media_router::mojom::SinkIconType::MEETING; return media_router::mojom::SinkIconType::MEETING;
case media_router::SinkIconType::HANGOUT:
return media_router::mojom::SinkIconType::HANGOUT;
case media_router::SinkIconType::EDUCATION:
return media_router::mojom::SinkIconType::EDUCATION;
case media_router::SinkIconType::GENERIC: case media_router::SinkIconType::GENERIC:
return media_router::mojom::SinkIconType::GENERIC; return media_router::mojom::SinkIconType::GENERIC;
} }
...@@ -276,17 +278,20 @@ struct EnumTraits<media_router::mojom::SinkIconType, ...@@ -276,17 +278,20 @@ struct EnumTraits<media_router::mojom::SinkIconType,
case media_router::mojom::SinkIconType::CAST: case media_router::mojom::SinkIconType::CAST:
*output = media_router::SinkIconType::CAST; *output = media_router::SinkIconType::CAST;
return true; return true;
case media_router::mojom::SinkIconType::CAST_AUDIO_GROUP:
*output = media_router::SinkIconType::CAST_AUDIO_GROUP;
return true;
case media_router::mojom::SinkIconType::CAST_AUDIO: case media_router::mojom::SinkIconType::CAST_AUDIO:
*output = media_router::SinkIconType::CAST_AUDIO; *output = media_router::SinkIconType::CAST_AUDIO;
return true; return true;
case media_router::mojom::SinkIconType::CAST_AUDIO_GROUP: case media_router::mojom::SinkIconType::MEETING:
*output = media_router::SinkIconType::CAST_AUDIO_GROUP; *output = media_router::SinkIconType::MEETING;
return true; return true;
case media_router::mojom::SinkIconType::HANGOUT: case media_router::mojom::SinkIconType::HANGOUT:
*output = media_router::SinkIconType::HANGOUT; *output = media_router::SinkIconType::HANGOUT;
return true; return true;
case media_router::mojom::SinkIconType::MEETING: case media_router::mojom::SinkIconType::EDUCATION:
*output = media_router::SinkIconType::MEETING; *output = media_router::SinkIconType::EDUCATION;
return true; return true;
case media_router::mojom::SinkIconType::GENERIC: case media_router::mojom::SinkIconType::GENERIC:
*output = media_router::SinkIconType::GENERIC; *output = media_router::SinkIconType::GENERIC;
......
...@@ -56,16 +56,18 @@ define('media_router_bindings', [ ...@@ -56,16 +56,18 @@ define('media_router_bindings', [
switch (type) { switch (type) {
case 'cast': case 'cast':
return mediaRouterMojom.SinkIconType.CAST; return mediaRouterMojom.SinkIconType.CAST;
case 'cast_audio':
return mediaRouterMojom.SinkIconType.CAST_AUDIO;
case 'cast_audio_group': case 'cast_audio_group':
return mediaRouterMojom.SinkIconType.CAST_AUDIO_GROUP; return mediaRouterMojom.SinkIconType.CAST_AUDIO_GROUP;
case 'generic': case 'cast_audio':
return mediaRouterMojom.SinkIconType.GENERIC; return mediaRouterMojom.SinkIconType.CAST_AUDIO;
case 'hangout':
return mediaRouterMojom.SinkIconType.HANGOUT;
case 'meeting': case 'meeting':
return mediaRouterMojom.SinkIconType.MEETING; return mediaRouterMojom.SinkIconType.MEETING;
case 'hangout':
return mediaRouterMojom.SinkIconType.HANGOUT;
case 'education':
return mediaRouterMojom.SinkIconType.EDUCATION;
case 'generic':
return mediaRouterMojom.SinkIconType.GENERIC;
default: default:
console.error('Unknown sink icon type : ' + type); console.error('Unknown sink icon type : ' + type);
return mediaRouterMojom.SinkIconType.GENERIC; return mediaRouterMojom.SinkIconType.GENERIC;
......
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