OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 /** @const */ var DictionaryWordsList = | 6 /** @const */ var DictionaryWordsList = |
7 options.dictionary_words.DictionaryWordsList; | 7 options.dictionary_words.DictionaryWordsList; |
8 /** @const */ var OptionsPage = options.OptionsPage; | 8 /** @const */ var OptionsPage = options.OptionsPage; |
9 | 9 |
10 /** | 10 /** |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 this.noMatchesLabel_.hidden = true; | 90 this.noMatchesLabel_.hidden = true; |
91 this.wordList_.classList.remove('no-search-matches'); | 91 this.wordList_.classList.remove('no-search-matches'); |
92 } | 92 } |
93 }, | 93 }, |
94 }; | 94 }; |
95 | 95 |
96 EditDictionaryOverlay.setWordList = function(entries) { | 96 EditDictionaryOverlay.setWordList = function(entries) { |
97 EditDictionaryOverlay.getInstance().wordList_.setWordList(entries); | 97 EditDictionaryOverlay.getInstance().wordList_.setWordList(entries); |
98 }; | 98 }; |
99 | 99 |
| 100 EditDictionaryOverlay.updateWords = function(add_words, remove_words) { |
| 101 EditDictionaryOverlay.getInstance().wordList_.addWords(add_words); |
| 102 EditDictionaryOverlay.getInstance().wordList_.removeWords(remove_words); |
| 103 }; |
| 104 |
100 EditDictionaryOverlay.getWordListForTesting = function() { | 105 EditDictionaryOverlay.getWordListForTesting = function() { |
101 return EditDictionaryOverlay.getInstance().wordList_; | 106 return EditDictionaryOverlay.getInstance().wordList_; |
102 }; | 107 }; |
103 | 108 |
104 return { | 109 return { |
105 EditDictionaryOverlay: EditDictionaryOverlay | 110 EditDictionaryOverlay: EditDictionaryOverlay |
106 }; | 111 }; |
107 }); | 112 }); |
OLD | NEW |