OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 cr.define('extensions', function() { |
| 6 var Toolbar = Polymer({ |
| 7 is: 'extensions-toolbar', |
| 8 |
| 9 /** @param {string} searchTerm */ |
| 10 onSearchTermSearch: function(searchTerm) { |
| 11 }, |
| 12 }); |
| 13 |
| 14 /** |
| 15 * @constructor |
| 16 * @implements {SearchFieldDelegate} |
| 17 */ |
| 18 // TODO(devlin): This is a bit excessive, and it would be better to just have |
| 19 // Toolbar implement SearchFieldDelegate. But for now, we don't know how to |
| 20 // make that happen with closure compiler. |
| 21 function ToolbarSearchFieldDelegate(toolbar) { |
| 22 this.toolbar_ = toolbar; |
| 23 } |
| 24 |
| 25 ToolbarSearchFieldDelegate.prototype = { |
| 26 /** @override */ |
| 27 onSearchTermSearch: function(searchTerm) { |
| 28 this.toolbar_.onSearchTermSearch(searchTerm); |
| 29 } |
| 30 }; |
| 31 |
| 32 return {Toolbar: Toolbar}; |
| 33 }); |
OLD | NEW |