summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/ntp/most_visited.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/resources/ntp/most_visited.js b/chrome/browser/resources/ntp/most_visited.js
index fbdffb4..14f23bc 100644
--- a/chrome/browser/resources/ntp/most_visited.js
+++ b/chrome/browser/resources/ntp/most_visited.js
@@ -456,7 +456,8 @@ var MostVisited = (function() {
item.style.zIndex = 2;
},
- // We listen to mousedown to get the relative position of the cursor for dnd.
+ // We listen to mousedown to get the relative position of the cursor for
+ // dnd.
handleMouseDown_: function(e) {
var item = getItem(e.target);
if (item) {
@@ -561,6 +562,14 @@ var MostVisited = (function() {
} else if (target.classList.contains('remove')) {
this.blacklist(getItem(target));
e.preventDefault();
+ } else {
+ var item = getItem(target);
+ if (item) {
+ var index = Array.prototype.indexOf.call(item.parentNode.children,
+ item);
+ if (index != -1)
+ chrome.send('metrics', ['NTP_MostVisited' + index]);
+ }
}
},