| OLD | NEW |
| 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-search-engines-page' is the settings page | 6 * @fileoverview 'settings-search-engines-page' is the settings page |
| 7 * containing search engines settings. | 7 * containing search engines settings. |
| 8 * | 8 * |
| 9 * @group Chrome Settings Elements | 9 * @group Chrome Settings Elements |
| 10 * @element settings-search-engines-page | 10 * @element settings-search-engines-page |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 }, | 22 }, |
| 23 | 23 |
| 24 /** @type {!Array<!SearchEngine>} */ | 24 /** @type {!Array<!SearchEngine>} */ |
| 25 otherEngines: { | 25 otherEngines: { |
| 26 type: Array, | 26 type: Array, |
| 27 value: function() { return []; } | 27 value: function() { return []; } |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** @private {boolean} */ | 30 /** @private {boolean} */ |
| 31 showAddSearchEngineDialog_: Boolean, | 31 showAddSearchEngineDialog_: Boolean, |
| 32 | |
| 33 /** @private {boolean} */ | |
| 34 otherSearchEnginesExpanded_: { | |
| 35 type: Boolean, | |
| 36 value: true, | |
| 37 }, | |
| 38 }, | 32 }, |
| 39 | 33 |
| 40 /** @override */ | 34 /** @override */ |
| 41 ready: function() { | 35 ready: function() { |
| 42 settings.SearchEnginesBrowserProxyImpl.getInstance(). | 36 settings.SearchEnginesBrowserProxyImpl.getInstance(). |
| 43 getSearchEnginesList().then(this.enginesChanged_.bind(this)); | 37 getSearchEnginesList().then(this.enginesChanged_.bind(this)); |
| 44 this.addWebUIListener( | 38 this.addWebUIListener( |
| 45 'search-engines-changed', this.enginesChanged_.bind(this)); | 39 'search-engines-changed', this.enginesChanged_.bind(this)); |
| 46 }, | 40 }, |
| 47 | 41 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 var dialog = this.$$('settings-search-engine-dialog'); | 57 var dialog = this.$$('settings-search-engine-dialog'); |
| 64 // Register listener to detect when the dialog is closed. Flip the boolean | 58 // Register listener to detect when the dialog is closed. Flip the boolean |
| 65 // once closed to force a restamp next time it is shown such that the | 59 // once closed to force a restamp next time it is shown such that the |
| 66 // previous dialog's contents are cleared. | 60 // previous dialog's contents are cleared. |
| 67 dialog.addEventListener('iron-overlay-closed', function() { | 61 dialog.addEventListener('iron-overlay-closed', function() { |
| 68 this.showAddSearchEngineDialog_ = false; | 62 this.showAddSearchEngineDialog_ = false; |
| 69 }.bind(this)); | 63 }.bind(this)); |
| 70 }.bind(this)); | 64 }.bind(this)); |
| 71 }, | 65 }, |
| 72 }); | 66 }); |
| OLD | NEW |