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 OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
8 | 8 |
9 /** | 9 /** |
10 * Encapsulated handling of search engine management page. | 10 * Encapsulated handling of search engine management page. |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 /** | 31 /** |
32 * List for other search engine options. | 32 * List for other search engine options. |
33 * @private | 33 * @private |
34 */ | 34 */ |
35 othersList_: null, | 35 othersList_: null, |
36 | 36 |
37 /** | 37 /** |
38 * List for extension keywords. | 38 * List for extension keywords. |
39 * @private | 39 * @private |
40 extensionList_ : null, | 40 */ |
| 41 extensionList_: null, |
41 | 42 |
42 /** inheritDoc */ | 43 /** inheritDoc */ |
43 initializePage: function() { | 44 initializePage: function() { |
44 OptionsPage.prototype.initializePage.call(this); | 45 OptionsPage.prototype.initializePage.call(this); |
45 | 46 |
46 this.defaultsList_ = $('default-search-engine-list'); | 47 this.defaultsList_ = $('default-search-engine-list'); |
47 this.setUpList_(this.defaultsList_); | 48 this.setUpList_(this.defaultsList_); |
48 | 49 |
49 this.othersList_ = $('other-search-engine-list'); | 50 this.othersList_ = $('other-search-engine-list'); |
50 this.setUpList_(this.othersList_); | 51 this.setUpList_(this.othersList_); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 SearchEngineManager.updateSearchEngineList = function(defaultEngines, | 107 SearchEngineManager.updateSearchEngineList = function(defaultEngines, |
107 otherEngines, | 108 otherEngines, |
108 keywords) { | 109 keywords) { |
109 SearchEngineManager.getInstance().updateSearchEngineList_(defaultEngines, | 110 SearchEngineManager.getInstance().updateSearchEngineList_(defaultEngines, |
110 otherEngines, | 111 otherEngines, |
111 keywords); | 112 keywords); |
112 }; | 113 }; |
113 | 114 |
114 SearchEngineManager.validityCheckCallback = function(validity, modelIndex) { | 115 SearchEngineManager.validityCheckCallback = function(validity, modelIndex) { |
115 // Forward to both lists; the one without a matching modelIndex will ignore | 116 // Forward to all lists; those without a matching modelIndex will ignore it. |
116 // it. | |
117 SearchEngineManager.getInstance().defaultsList_.validationComplete( | 117 SearchEngineManager.getInstance().defaultsList_.validationComplete( |
118 validity, modelIndex); | 118 validity, modelIndex); |
119 SearchEngineManager.getInstance().othersList_.validationComplete( | 119 SearchEngineManager.getInstance().othersList_.validationComplete( |
120 validity, modelIndex); | 120 validity, modelIndex); |
| 121 SearchEngineManager.getInstance().extensionList_.validationComplete( |
| 122 validity, modelIndex); |
121 }; | 123 }; |
122 | 124 |
123 // Export | 125 // Export |
124 return { | 126 return { |
125 SearchEngineManager: SearchEngineManager | 127 SearchEngineManager: SearchEngineManager |
126 }; | 128 }; |
127 | 129 |
128 }); | 130 }); |
129 | 131 |
OLD | NEW |