Index: chrome/browser/resources/ntp4/card_slider.js |
diff --git a/chrome/browser/resources/ntp4/card_slider.js b/chrome/browser/resources/ntp4/card_slider.js |
index f9b97b9a366310181b03efc4d43ca629eb493016..b8864ee831dfed606be6cc830f7fda9a3232c022 100644 |
--- a/chrome/browser/resources/ntp4/card_slider.js |
+++ b/chrome/browser/resources/ntp4/card_slider.js |
@@ -272,6 +272,16 @@ var CardSlider = (function() { |
} |
}, |
+ selectCardByValue: function(newCard, opt_animate) { |
csilv
2011/05/24 19:50:18
nit: Add a function comment.
|
+ for (var i = 0; i < this.cards_.length; i++) { |
+ if (newCard == this.cards_[i]) { |
+ this.selectCard(i, opt_animate); |
+ return; |
+ } |
+ } |
+ assert(false); |
+ }, |
+ |
/** |
* Centers the view on the card denoted by this.currentCard. Can either |
* animate to that card or snap to it. |