Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: chrome/browser/resources/local_ntp/most_visited_title.js

Issue 17526008: Log NTP hovers in 1993 clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Spacing fixes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /** 6 /**
7 * @fileoverview Rendering for iframed most visited titles. 7 * @fileoverview Rendering for iframed most visited titles.
8 */ 8 */
9 9
10 window.addEventListener('DOMContentLoaded', function() { 10 window.addEventListener('DOMContentLoaded', function() {
11 'use strict'; 11 'use strict';
12 12
13 fillMostVisited(window.location, function(params, data) { 13 fillMostVisited(window.location, function(params, data) {
14 document.body.appendChild( 14 function handleMouseOver() {
15 createMostVisitedLink(params, data.url, data.title, data.title)); 15 var params = parseQueryParams(document.location);
16 if ('pos' in params && isFinite(params.pos)) {
17 var pos = parseInt(params.pos, 10);
18 var ntpApiHandle = chrome.embeddedSearch.newTabPage;
19 ntpApiHandle.logEvent('NewTabPage.NumberOfMouseOvers', 1, null, pos);
20 }
21 };
beaudoin 2013/06/22 01:14:53 Seems to be duplicated code, one more reason to ad
annark1 2013/06/25 16:01:38 Done.
22 var link = createMostVisitedLink(params, data.url, data.title, data.title);
23 link.addEventListener('mouseover', handleMouseOver);
24 document.body.appendChild(link);
16 }); 25 });
17 }); 26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698