| 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 | 6 |
| 7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
| 8 | 8 |
| 9 ///////////////////////////////////////////////////////////////////////////// | 9 ///////////////////////////////////////////////////////////////////////////// |
| 10 // CookiesView class: | 10 // CookiesView class: |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 chrome.send('updateCookieSearchResults', [filter]); | 81 chrome.send('updateCookieSearchResults', [filter]); |
| 82 } | 82 } |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Handles search query changes. | 86 * Handles search query changes. |
| 87 * @param {!Event} e The event object. | 87 * @param {!Event} e The event object. |
| 88 * @private | 88 * @private |
| 89 */ | 89 */ |
| 90 handleSearchQueryChange_: function(e) { | 90 handleSearchQueryChange_: function(e) { |
| 91 var stringId = document.querySelector('.cookies-search-box').value ? |
| 92 'remove_all_shown_cookie' : 'remove_all_cookie'; |
| 93 document.querySelector('.remove-all-cookies-button').innerHTML = |
| 94 loadTimeData.getString(stringId); |
| 91 if (this.queryDelayTimerId_) | 95 if (this.queryDelayTimerId_) |
| 92 window.clearTimeout(this.queryDelayTimerId_); | 96 window.clearTimeout(this.queryDelayTimerId_); |
| 93 | 97 |
| 94 this.queryDelayTimerId_ = window.setTimeout( | 98 this.queryDelayTimerId_ = window.setTimeout( |
| 95 this.searchCookie.bind(this), 500); | 99 this.searchCookie.bind(this), 500); |
| 96 }, | 100 }, |
| 97 | 101 |
| 98 initialized_: false, | 102 initialized_: false, |
| 99 | 103 |
| 100 /** | 104 /** |
| (...skipping 30 matching lines...) Expand all Loading... |
| 131 CookiesView.loadChildren = function(args) { | 135 CookiesView.loadChildren = function(args) { |
| 132 $('cookies-list').loadChildren(args[0], args[1]); | 136 $('cookies-list').loadChildren(args[0], args[1]); |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 // Export | 139 // Export |
| 136 return { | 140 return { |
| 137 CookiesView: CookiesView | 141 CookiesView: CookiesView |
| 138 }; | 142 }; |
| 139 | 143 |
| 140 }); | 144 }); |
| OLD | NEW |