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

Unified Diff: chrome/browser/resources/media_router/elements/cast_mode_picker/cast_mode_picker.js

Issue 1140823003: Redesign cast-mode-picker UX and switch to core/paper elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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: chrome/browser/resources/media_router/elements/cast_mode_picker/cast_mode_picker.js
diff --git a/chrome/browser/resources/media_router/elements/cast_mode_picker/cast_mode_picker.js b/chrome/browser/resources/media_router/elements/cast_mode_picker/cast_mode_picker.js
deleted file mode 100644
index 37f33b059efc179429ec6332378faf0d6f33f16d..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/media_router/elements/cast_mode_picker/cast_mode_picker.js
+++ /dev/null
@@ -1,67 +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 a drop down that shows the currently available
-// cast modes.
-Polymer('cast-mode-picker', {
- publish: {
- /**
- * The list of CastModes to show.
- *
- * @attribute castModeList
- * @type {?Array<!media_router.CastMode>}
- * @default null
- */
- castModeList: null,
-
- /**
- * The value of the selected cast mode in |castModeList|, or -1 if the
- * user has not explicitly selected a mode.
- *
- * @attribute selectedCastModeValue
- * @type {number}
- * @default -1
- */
- selectedCastModeValue: -1,
- },
-
- observe: {
- castModeList: 'updateSelectBoxSize',
- },
-
- created: function() {
- this.castModeList = [];
- },
-
- /**
- * Fires a cast-mode-click event. This is called when one of the cast modes
- * has been selected.
- *
- * @param {!Event} event The event object.
- * @param {!Object} detail The details of the event.
- * @param {!Element} sender Reference to clicked node.
- */
- onCastModeSelected: function(event, detail, sender) {
- this.castModeList.forEach(function(castMode) {
- if (castMode.type == sender.value) {
- this.fire('cast-mode-click', {
- headerText: this.castModeMap_[castMode.type].title
- });
- this.selectedCastModeValue = sender.value;
- return;
- }
- }, this);
- },
-
- /**
- * Called when |castModeList| has changed. Updates the size of the select
- * node.
- *
- * @param {?Array<!media_router.CastMode>} newValue The new value for
- * |castModeList|.
- */
- updateSelectBoxSize: function(oldValue, newValue) {
- this.$.selectbox.size = Math.max(newValue.length, 1);
- },
-});

Powered by Google App Engine
This is Rietveld 408576698