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 Polymer({ | 9 Polymer({ |
10 is: 'settings-search-engines-page', | 10 is: 'settings-search-engines-page', |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 onAddSearchEngineTap_: function(e) { | 89 onAddSearchEngineTap_: function(e) { |
90 e.preventDefault(); | 90 e.preventDefault(); |
91 this.showAddSearchEngineDialog_ = true; | 91 this.showAddSearchEngineDialog_ = true; |
92 this.async(function() { | 92 this.async(function() { |
93 var dialog = this.$$('settings-search-engine-dialog'); | 93 var dialog = this.$$('settings-search-engine-dialog'); |
94 // Register listener to detect when the dialog is closed. Flip the boolean | 94 // Register listener to detect when the dialog is closed. Flip the boolean |
95 // once closed to force a restamp next time it is shown such that the | 95 // once closed to force a restamp next time it is shown such that the |
96 // previous dialog's contents are cleared. | 96 // previous dialog's contents are cleared. |
97 dialog.addEventListener('close', function() { | 97 dialog.addEventListener('close', function() { |
98 this.showAddSearchEngineDialog_ = false; | 98 this.showAddSearchEngineDialog_ = false; |
99 this.$.addSearchEngine.focus(); | 99 cr.ui.focusWithoutInk(assert(this.$.addSearchEngine)); |
100 }.bind(this)); | 100 }.bind(this)); |
101 }.bind(this)); | 101 }.bind(this)); |
102 }, | 102 }, |
103 | 103 |
104 /** @private */ | 104 /** @private */ |
105 computeShowExtensionsList_: function() { | 105 computeShowExtensionsList_: function() { |
106 return this.extensions.length > 0; | 106 return this.extensions.length > 0; |
107 }, | 107 }, |
108 }); | 108 }); |
OLD | NEW |