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

Side by Side Diff: chrome/browser/resources/settings/languages_page/edit_dictionary_page.js

Issue 2847963003: [MD settings] specify @override on created, ready, and attached (Closed)
Patch Set: Created 3 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 * @fileoverview 'settings-edit-dictionary-page' is a sub-page for editing 6 * @fileoverview 'settings-edit-dictionary-page' is a sub-page for editing
7 * the "dictionary" of custom words used for spell check. 7 * the "dictionary" of custom words used for spell check.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-edit-dictionary-page', 10 is: 'settings-edit-dictionary-page',
11 11
12 behaviors: [settings.GlobalScrollTargetBehavior], 12 behaviors: [settings.GlobalScrollTargetBehavior],
13 13
14 properties: { 14 properties: {
15 /** @private {string} */ 15 /** @private {string} */
16 newWordValue_: String, 16 newWordValue_: String,
17 17
18 /** 18 /**
19 * Needed by GlobalScrollTargetBehavior. 19 * Needed by GlobalScrollTargetBehavior.
20 * @override 20 * @override
21 */ 21 */
22 subpageRoute: { 22 subpageRoute: {
23 type: Object, 23 type: Object,
24 value: settings.Route.EDIT_DICTIONARY, 24 value: settings.Route.EDIT_DICTIONARY,
25 }, 25 },
26 26
27 /** @private {!Array<string>} */ 27 /** @private {!Array<string>} */
28 words_: { 28 words_: {
29 type: Array, 29 type: Array,
30 value: function() { return []; }, 30 value: function() {
31 return [];
32 },
31 }, 33 },
32 }, 34 },
33 35
34 /** @type {LanguageSettingsPrivate} */ 36 /** @type {LanguageSettingsPrivate} */
35 languageSettingsPrivate: null, 37 languageSettingsPrivate: null,
36 38
39 /** @override */
37 ready: function() { 40 ready: function() {
38 this.languageSettingsPrivate = 41 this.languageSettingsPrivate =
39 settings.languageSettingsPrivateApiForTest || 42 settings.languageSettingsPrivateApiForTest ||
40 /** @type {!LanguageSettingsPrivate} */(chrome.languageSettingsPrivate); 43 /** @type {!LanguageSettingsPrivate} */(chrome.languageSettingsPrivate);
41 44
42 this.languageSettingsPrivate.getSpellcheckWords(function(words) { 45 this.languageSettingsPrivate.getSpellcheckWords(function(words) {
43 this.words_ = words; 46 this.words_ = words;
44 }.bind(this)); 47 }.bind(this));
45 48
46 // Updates are applied locally so they appear immediately, but we should 49 // Updates are applied locally so they appear immediately, but we should
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 139
137 /** 140 /**
138 * Checks if any words exists in the dictionary. 141 * Checks if any words exists in the dictionary.
139 * @private 142 * @private
140 * @return {boolean} 143 * @return {boolean}
141 */ 144 */
142 hasWords_: function() { 145 hasWords_: function() {
143 return this.words_.length > 0; 146 return this.words_.length > 0;
144 } 147 }
145 }); 148 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698