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.search_engines', function() { | 5 cr.define('options.search_engines', function() { |
6 /** @const */ var ControlledSettingIndicator = | 6 /** @const */ var ControlledSettingIndicator = |
7 options.ControlledSettingIndicator; | 7 options.ControlledSettingIndicator; |
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; | 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; |
9 /** @const */ var InlineEditableItem = options.InlineEditableItem; | 9 /** @const */ var InlineEditableItem = options.InlineEditableItem; |
10 /** @const */ var ListSelectionController = cr.ui.ListSelectionController; | 10 /** @const */ var ListSelectionController = cr.ui.ListSelectionController; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 this.addEventListener('commitedit', this.onEditCommitted_.bind(this)); | 179 this.addEventListener('commitedit', this.onEditCommitted_.bind(this)); |
180 } else { | 180 } else { |
181 this.editable = false; | 181 this.editable = false; |
182 this.querySelector('.row-delete-button').hidden = true; | 182 this.querySelector('.row-delete-button').hidden = true; |
183 var indicator = ControlledSettingIndicator(); | 183 var indicator = ControlledSettingIndicator(); |
184 indicator.setAttribute('setting', 'search-engine'); | 184 indicator.setAttribute('setting', 'search-engine'); |
185 // Create a synthetic pref change event decorated as | 185 // Create a synthetic pref change event decorated as |
186 // CoreOptionsHandler::CreateValueForPref() does. | 186 // CoreOptionsHandler::CreateValueForPref() does. |
187 var event = new Event(this.contentType); | 187 var event = new Event(this.contentType); |
188 if (engine.extension) { | 188 if (engine.extension) { |
189 event.value = { controlledBy: 'extension' }; | 189 event.value = { controlledBy: 'extension', |
190 // TODO(mad): add id, name, and icon once we solved the issue with the | 190 extension: engine.extension}; |
Dan Beam
2014/03/07 20:13:02
nit: space before } to stay consistent with other
| |
191 // search engine manager in http://crbug.com/314507. | |
192 } else { | 191 } else { |
193 event.value = { controlledBy: 'policy' }; | 192 event.value = { controlledBy: 'policy' }; |
194 } | 193 } |
195 indicator.handlePrefChange(event); | 194 indicator.handlePrefChange(event); |
196 this.appendChild(indicator); | 195 this.appendChild(indicator); |
197 } | 196 } |
198 }, | 197 }, |
199 | 198 |
200 /** @override */ | 199 /** @override */ |
201 get currentInputIsValid() { | 200 get currentInputIsValid() { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 }, | 333 }, |
335 }; | 334 }; |
336 | 335 |
337 // Export | 336 // Export |
338 return { | 337 return { |
339 SearchEngineList: SearchEngineList | 338 SearchEngineList: SearchEngineList |
340 }; | 339 }; |
341 | 340 |
342 }); | 341 }); |
343 | 342 |
OLD | NEW |