OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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-engine-dialog' is a component for adding | 6 * @fileoverview 'settings-search-engine-dialog' is a component for adding |
7 * or editing a search engine entry. | 7 * or editing a search engine entry. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-search-engine-dialog', | 10 is: 'settings-search-engine-dialog', |
(...skipping 15 matching lines...) Expand all Loading... |
26 /** @private {string} */ | 26 /** @private {string} */ |
27 queryUrl_: String, | 27 queryUrl_: String, |
28 | 28 |
29 /** @private {string} */ | 29 /** @private {string} */ |
30 dialogTitle_: String, | 30 dialogTitle_: String, |
31 | 31 |
32 /** @private {string} */ | 32 /** @private {string} */ |
33 actionButtonText_: String, | 33 actionButtonText_: String, |
34 }, | 34 }, |
35 | 35 |
36 /** @private {!settings.SearchEnginesBrowserProxy} */ | 36 /** @private {settings.SearchEnginesBrowserProxy} */ |
37 browserProxy_: null, | 37 browserProxy_: null, |
38 | 38 |
39 /** | 39 /** |
40 * The |modelIndex| to use when a new search engine is added. Must match with | 40 * The |modelIndex| to use when a new search engine is added. Must match with |
41 * kNewSearchEngineIndex constant specified at | 41 * kNewSearchEngineIndex constant specified at |
42 * chrome/browser/ui/webui/settings/search_engines_handler.cc | 42 * chrome/browser/ui/webui/settings/search_engines_handler.cc |
43 * @const {number} | 43 * @const {number} |
44 */ | 44 */ |
45 DEFAULT_MODEL_INDEX: -1, | 45 DEFAULT_MODEL_INDEX: -1, |
46 | 46 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 /** @private */ | 108 /** @private */ |
109 updateActionButtonState_: function() { | 109 updateActionButtonState_: function() { |
110 var allValid = [ | 110 var allValid = [ |
111 this.$.searchEngine, this.$.keyword, this.$.queryUrl | 111 this.$.searchEngine, this.$.keyword, this.$.queryUrl |
112 ].every(function(inputElement) { | 112 ].every(function(inputElement) { |
113 return !inputElement.invalid && inputElement.value.length != 0; | 113 return !inputElement.invalid && inputElement.value.length != 0; |
114 }); | 114 }); |
115 this.$.actionButton.disabled = !allValid; | 115 this.$.actionButton.disabled = !allValid; |
116 }, | 116 }, |
117 }); | 117 }); |
OLD | NEW |