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

Side by Side Diff: chrome/browser/resources/media_router/elements/issue_banner/issue_banner.js

Issue 1933013002: [Media Router WebUI] Remove unnecessary default property values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This Polymer element is used to show information about issues related 5 // This Polymer element is used to show information about issues related
6 // to casting. 6 // to casting.
7 Polymer({ 7 Polymer({
8 is: 'issue-banner', 8 is: 'issue-banner',
9 9
10 properties: { 10 properties: {
11 /** 11 /**
12 * Maps an issue action type to the resource identifier of the text shown 12 * Maps an issue action type to the resource identifier of the text shown
13 * in the action button. 13 * in the action button.
14 * This is a property of issue-banner because it is used in tests. This 14 * This is a property of issue-banner because it is used in tests. This
15 * property should always be set before |issue| is set or updated. 15 * property should always be set before |issue| is set or updated.
16 * @private {!Array<string>} 16 * @private {!Array<string>}
17 */ 17 */
18 actionTypeToButtonTextResource_: { 18 actionTypeToButtonTextResource_: {
19 type: Array, 19 type: Array,
20 readOnly: true, 20 readOnly: true,
21 value: function() { 21 value: function() {
22 return ['dismissButton', 'learnMoreText']; 22 return ['dismissButton', 'learnMoreText'];
23 }, 23 },
24 }, 24 },
25 25
26 /** 26 /**
27 * The text shown in the default action button. 27 * The text shown in the default action button.
28 * @private {string} 28 * @private {string|undefined}
29 */ 29 */
30 defaultActionButtonText_: { 30 defaultActionButtonText_: {
31 type: String, 31 type: String,
32 value: '',
33 }, 32 },
34 33
35 /** 34 /**
36 * The issue to show. 35 * The issue to show.
37 * @type {?media_router.Issue} 36 * @type {?media_router.Issue|undefined}
38 */ 37 */
39 issue: { 38 issue: {
40 type: Object, 39 type: Object,
41 value: null,
42 observer: 'updateActionButtonText_', 40 observer: 'updateActionButtonText_',
43 }, 41 },
44 42
45 /** 43 /**
46 * The text shown in the secondary action button. 44 * The text shown in the secondary action button.
47 * @private {string} 45 * @private {string|undefined}
48 */ 46 */
49 secondaryActionButtonText_: { 47 secondaryActionButtonText_: {
50 type: String, 48 type: String,
51 value: '',
52 }, 49 },
53 }, 50 },
54 51
55 behaviors: [ 52 behaviors: [
56 I18nBehavior, 53 I18nBehavior,
57 ], 54 ],
58 55
59 /** 56 /**
60 * @param {?media_router.Issue} issue 57 * @param {?media_router.Issue} issue
61 * @return {boolean} Whether or not to hide the blocking issue UI. 58 * @return {boolean} Whether or not to hide the blocking issue UI.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 secondaryText = 136 secondaryText =
140 this.i18n(this.actionTypeToButtonTextResource_[ 137 this.i18n(this.actionTypeToButtonTextResource_[
141 this.issue.secondaryActionType]); 138 this.issue.secondaryActionType]);
142 } 139 }
143 } 140 }
144 141
145 this.defaultActionButtonText_ = defaultText; 142 this.defaultActionButtonText_ = defaultText;
146 this.secondaryActionButtonText_ = secondaryText; 143 this.secondaryActionButtonText_ = secondaryText;
147 }, 144 },
148 }); 145 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698