| 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 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Encapsulated handling of a search bubble. | 9 * Encapsulated handling of a search bubble. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 this.lastTop = top; | 95 this.lastTop = top; |
| 96 } | 96 } |
| 97 }, | 97 }, |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * Encapsulated handling of the search page. | 101 * Encapsulated handling of the search page. |
| 102 * @constructor | 102 * @constructor |
| 103 */ | 103 */ |
| 104 function SearchPage() { | 104 function SearchPage() { |
| 105 OptionsPage.call(this, 'search', templateData.searchPageTabTitle, | 105 OptionsPage.call(this, 'search', |
| 106 'searchPage'); | 106 loadTimeData.getString('searchPageTabTitle'), |
| 107 'searchPage'); |
| 107 } | 108 } |
| 108 | 109 |
| 109 cr.addSingletonGetter(SearchPage); | 110 cr.addSingletonGetter(SearchPage); |
| 110 | 111 |
| 111 SearchPage.prototype = { | 112 SearchPage.prototype = { |
| 112 // Inherit SearchPage from OptionsPage. | 113 // Inherit SearchPage from OptionsPage. |
| 113 __proto__: OptionsPage.prototype, | 114 __proto__: OptionsPage.prototype, |
| 114 | 115 |
| 115 /** | 116 /** |
| 116 * A boolean to prevent recursion. Used by setSearchText_(). | 117 * A boolean to prevent recursion. Used by setSearchText_(). |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 // Trim beginning and ending whitespace. | 558 // Trim beginning and ending whitespace. |
| 558 return text.replace(/^\s+|\s+$/g, ''); | 559 return text.replace(/^\s+|\s+$/g, ''); |
| 559 }; | 560 }; |
| 560 | 561 |
| 561 // Export | 562 // Export |
| 562 return { | 563 return { |
| 563 SearchPage: SearchPage | 564 SearchPage: SearchPage |
| 564 }; | 565 }; |
| 565 | 566 |
| 566 }); | 567 }); |
| OLD | NEW |