| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 A search Widget presenting a list of nodes with the ability | 6 * @fileoverview A search Widget presenting a list of nodes with the ability |
| 7 * to sync selection when chosen. | 7 * to sync selection when chosen. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 goog.provide('cvox.NodeSearchWidget'); | 10 goog.provide('cvox.NodeSearchWidget'); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 this.predicate_ = predicate; | 27 this.predicate_ = predicate; |
| 28 goog.base(this); | 28 goog.base(this); |
| 29 }; | 29 }; |
| 30 goog.inherits(cvox.NodeSearchWidget, cvox.SearchWidget); | 30 goog.inherits(cvox.NodeSearchWidget, cvox.SearchWidget); |
| 31 | 31 |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @override | 34 * @override |
| 35 */ | 35 */ |
| 36 cvox.NodeSearchWidget.prototype.getNameMsg = function() { | 36 cvox.NodeSearchWidget.prototype.getNameMsg = function() { |
| 37 return ['choice_widget_name', [cvox.ChromeVox.msgs.getMsg(this.typeMsg_)]]; | 37 return ['choice_widget_name', [Msgs.getMsg(this.typeMsg_)]]; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * @override | 42 * @override |
| 43 */ | 43 */ |
| 44 cvox.NodeSearchWidget.prototype.getHelpMsg = function() { | 44 cvox.NodeSearchWidget.prototype.getHelpMsg = function() { |
| 45 return 'choice_widget_help'; | 45 return 'choice_widget_help'; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * @override | 50 * @override |
| 51 */ | 51 */ |
| 52 cvox.NodeSearchWidget.prototype.getPredicate = function() { | 52 cvox.NodeSearchWidget.prototype.getPredicate = function() { |
| 53 return this.predicate_; | 53 return this.predicate_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * Shows a list generated dynamic satisfying some predicate. | 58 * Shows a list generated dynamic satisfying some predicate. |
| 59 * @param {string} typeMsg The message id of the type contained in nodes. | 59 * @param {string} typeMsg The message id of the type contained in nodes. |
| 60 * @param {function(Array<Node>)} predicate The predicate. | 60 * @param {function(Array<Node>)} predicate The predicate. |
| 61 * @return {cvox.NodeSearchWidget} The widget. | 61 * @return {cvox.NodeSearchWidget} The widget. |
| 62 */ | 62 */ |
| 63 cvox.NodeSearchWidget.create = function(typeMsg, predicate) { | 63 cvox.NodeSearchWidget.create = function(typeMsg, predicate) { |
| 64 return new cvox.NodeSearchWidget(typeMsg, predicate); | 64 return new cvox.NodeSearchWidget(typeMsg, predicate); |
| 65 }; | 65 }; |
| OLD | NEW |