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

Side by Side Diff: chrome/browser/resources/settings/controls/settings_dropdown_menu.js

Issue 1973973004: [MD settings] remove unneeded use of I18nBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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
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 /** 5 /**
6 * The |name| is shown in the gui. The |value| us use to set or compare with 6 * The |name| is shown in the gui. The |value| us use to set or compare with
7 * the preference value. 7 * the preference value.
8 * @typedef {{ 8 * @typedef {{
9 * name: string, 9 * name: string,
10 * value: (number|string) 10 * value: (number|string)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 * The value of the 'custom' item. 68 * The value of the 'custom' item.
69 * @private 69 * @private
70 */ 70 */
71 notFoundValue_: { 71 notFoundValue_: {
72 type: String, 72 type: String,
73 value: 'SETTINGS_DROPDOWN_NOT_FOUND_ITEM', 73 value: 'SETTINGS_DROPDOWN_NOT_FOUND_ITEM',
74 }, 74 },
75 }, 75 },
76 76
77 behaviors: [ 77 behaviors: [
78 I18nBehavior,
79 PrefControlBehavior, 78 PrefControlBehavior,
80 ], 79 ],
81 80
82 observers: [ 81 observers: [
83 'checkSetup_(menuOptions)', 82 'checkSetup_(menuOptions)',
84 'updateSelected_(pref.value)', 83 'updateSelected_(pref.value)',
85 ], 84 ],
86 85
87 ready: function() { 86 ready: function() {
88 this.checkSetup_(this.menuOptions); 87 this.checkSetup_(this.menuOptions);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 }, 142 },
144 143
145 /** 144 /**
146 * @return {boolean} 145 * @return {boolean}
147 * @private 146 * @private
148 */ 147 */
149 shouldDisableMenu_: function() { 148 shouldDisableMenu_: function() {
150 return this.disabled || !this.menuOptions.length; 149 return this.disabled || !this.menuOptions.length;
151 }, 150 },
152 }); 151 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698