From 1de7ddc822db43235df2f68487a1c30ab2a925e0 Mon Sep 17 00:00:00 2001 From: apacible Date: Thu, 14 May 2015 17:09:11 -0700 Subject: [PATCH] Media Router: Replace drop-down-button with core-icon-button. - Removes drop-down-button custom polymer element. - Removes Media Router drop-down icons. - Replace drop-down-button with core-icon-button. Review URL: https://codereview.chromium.org/1128023003 Cr-Commit-Position: refs/heads/master@{#329985} --- chrome/browser/media_router_resources.grdp | 9 ------- .../elements/drop_down_button/drop_down_button.css | 26 --------------------- .../drop_down_button/drop_down_button.html | 10 -------- .../elements/drop_down_button/drop_down_button.js | 23 ------------------ .../elements/icon/down-arrow-showing.png | Bin 200 -> 0 bytes .../elements/icon/drop-down-arrow-hover.png | Bin 88 -> 0 bytes .../elements/icon/drop-down-arrow-hover2x.png | Bin 117 -> 0 bytes .../elements/icon/drop-down-arrow-showing.png | Bin 111 -> 0 bytes .../elements/icon/drop-down-arrow-showing2x.png | Bin 152 -> 0 bytes .../media_router/elements/icon/drop-down-arrow.png | Bin 90 -> 0 bytes .../elements/icon/drop-down-arrow2x.png | Bin 126 -> 0 bytes .../media_router_container.css | 7 +----- .../media_router_container.html | 9 ++++--- .../media_router_container.js | 12 ++++++++++ .../media_router_resources_provider.cc | 21 ----------------- 15 files changed, 17 insertions(+), 100 deletions(-) delete mode 100644 chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.css delete mode 100644 chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.html delete mode 100644 chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.js delete mode 100644 chrome/browser/resources/media_router/elements/icon/down-arrow-showing.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover2x.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow-showing.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow-showing2x.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow.png delete mode 100644 chrome/browser/resources/media_router/elements/icon/drop-down-arrow2x.png diff --git a/chrome/browser/media_router_resources.grdp b/chrome/browser/media_router_resources.grdp index 0756d6e86d93..df0ae01272a4 100644 --- a/chrome/browser/media_router_resources.grdp +++ b/chrome/browser/media_router_resources.grdp @@ -12,9 +12,6 @@ - - - @@ -26,12 +23,6 @@ - - - - - - diff --git a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.css b/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.css deleted file mode 100644 index f8a0f56d563c..000000000000 --- a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.css +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2015 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. */ - -#drop-down { - background: white; - background-image: -webkit-image-set( - url(../icon/drop-down-arrow.png) 1x, - url(../icon/drop-down-arrow2x.png) 2x); - background-repeat: no-repeat; - border: 1px solid rgb(192, 195, 198); - height: 18px; - width: 18px; -} - -#drop-down:hover { - background-image: -webkit-image-set( - url(../icon/drop-down-arrow-hover.png) 1x, - url(../icon/drop-down-arrow-hover2x.png) 2x); -} - -#drop-down.showing { - background-image: -webkit-image-set( - url(../icon/drop-down-arrow-showing.png) 1x, - url(../icon/drop-down-arrow-showing2x.png) 2x); -} \ No newline at end of file diff --git a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.html b/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.html deleted file mode 100644 index 52d52d263a55..000000000000 --- a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.js b/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.js deleted file mode 100644 index 613047c46636..000000000000 --- a/chrome/browser/resources/media_router/elements/drop_down_button/drop_down_button.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 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. - -// This Polymer element is used as a button to toggle a drop down, such as -// the cast-mode-picker. -Polymer('drop-down-button', { - /** - * Whether or not to use the icon indicating that the drop down is shown. - * @private {boolean} - * @default false - */ - useShownIcon_: false, - - /** - * Fires a drop-down-button-click event. This is called when |this| is - * clicked. Switches the value of |useShownIcon_|. - */ - onButtonClick: function() { - this.useShownIcon_ = !this.useShownIcon_; - this.fire('drop-down-button-click'); - }, -}); diff --git a/chrome/browser/resources/media_router/elements/icon/down-arrow-showing.png b/chrome/browser/resources/media_router/elements/icon/down-arrow-showing.png deleted file mode 100644 index 018dbe9d6ebc0d864f9060aa0ab53c9c0fe04f2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 200 zcwXxa@N?(olHy`uVBq!ia0vp^Y(UJ+0U|dr*8K)jjKx9jP7LeL$-D%~CV9KNFc>gc zGB~~F`Wpol;VkfoEM{Qf^9ABLjQ76H2?q+Ymw5WRvfpJDWf0XbCYGe8D3oWGWGJ|M`UZqI@`(c#DSNs&hHzX@{`3F;|9Uo^hLaagNjhJ+ maB5~F=P?Jdl!Sx?28MK1wq5mxQWJp689ZJ6T-G@yGywpel{c&a diff --git a/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover.png b/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover.png deleted file mode 100644 index 68ad72ffeb086923bdfa84dcc07562fa29773fc9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 88 zcwXxa@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m&6$qQ7<;OXk;vd$@?2>^5d7g7KK diff --git a/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover2x.png b/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-hover2x.png deleted file mode 100644 index 2a5865da4884787a6953a50b56de74772b0a2799..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 117 zcwXxa@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;ji-xaNCo5DGYbU|7zi9Wp#Ajs z`d8M44-}PqJ>7)v&zQM4W0U1{^X8RC9a_#HqFLj}lqR2*oiqQg diff --git a/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-showing.png b/chrome/browser/resources/media_router/elements/icon/drop-down-arrow-showing.png deleted file mode 100644 index ea3bd59bd2a789716c7f9195fa3a12cb231b3473..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 111 zcwXxa@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|mSQK*5Dp-y;YjHK^3^|k1|%Oc%$NbBSc;uILpXq-h9ji|$oKbjaSVxQ zeS2vm=K%vA){D}vzx|*3K5`Q`krGJOC5 diff --git a/chrome/browser/resources/media_router/elements/icon/drop-down-arrow.png b/chrome/browser/resources/media_router/elements/icon/drop-down-arrow.png deleted file mode 100644 index 190d37381bc85ff1f7fe48dfd447493c2734a46e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 90 zcwXxa@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m6g^!WLp07OCrGfWG+k=D^xtDc n|k0wldT1B8K;tEY=&h{y4_mv{3rDDXHR?3tvx zH{Yz0O;OQfqJQh3JMrm)$0T0!a~&>7yTGS)Y)8nP${@>Ui$0xkygI}8>P%Nn{ew5k ZeFc9+{O|QuN&p(j;OXk;vd$@?2>_IADlGs2 diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css index e3d136fc88c8..f8d149a15050 100644 --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css @@ -3,7 +3,7 @@ * found in the LICENSE file. */ #cast-modes { - margin: 40px 0; + margin: 40px 2px; position: absolute; z-index: 1; } @@ -20,11 +20,6 @@ background-color: rgb(214, 214, 214); } -#drop-down-button { - margin-top: 10px; - z-index: 1; -} - .hide { display: none; } diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html index 618fc2fb62fa..153003789f20 100644 --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html @@ -3,10 +3,9 @@ - + - @@ -19,9 +18,9 @@
{{headerText}}
- - + + AddResourcePath("elements/icon/drop-down-arrow.png", - IDR_DROP_DOWN_ARROW_ICON); - html_source->AddResourcePath("elements/icon/drop-down-arrow2x.png", - IDR_DROP_DOWN_ARROW_2X_ICON); - html_source->AddResourcePath("elements/icon/drop-down-arrow-hover.png", - IDR_DROP_DOWN_ARROW_HOVER_ICON); - html_source->AddResourcePath("elements/icon/drop-down-arrow-hover2x.png", - IDR_DROP_DOWN_ARROW_HOVER_2X_ICON); - html_source->AddResourcePath("elements/icon/drop-down-arrow-showing.png", - IDR_DROP_DOWN_ARROW_SHOWING_ICON); - html_source->AddResourcePath("elements/icon/drop-down-arrow-showing2x.png", - IDR_DROP_DOWN_ARROW_SHOWING_2X_ICON); html_source->AddResourcePath("elements/icon/sad-face.png", IDR_SAD_FACE_ICON); html_source->AddResourcePath("elements/icon/sad-face2x.png", @@ -51,15 +39,6 @@ void AddPolymerElements(content::WebUIDataSource* html_source) { "elements/cast_mode_picker/cast_mode_picker.js", IDR_CAST_MODE_PICKER_JS); html_source->AddResourcePath( - "elements/drop_down_button/drop_down_button.css", - IDR_DROP_DOWN_BUTTON_CSS); - html_source->AddResourcePath( - "elements/drop_down_button/drop_down_button.html", - IDR_DROP_DOWN_BUTTON_HTML); - html_source->AddResourcePath( - "elements/drop_down_button/drop_down_button.js", - IDR_DROP_DOWN_BUTTON_JS); - html_source->AddResourcePath( "elements/issue_banner/issue_banner.css", IDR_ISSUE_BANNER_CSS); html_source->AddResourcePath( -- 2.11.4.GIT