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

Side by Side Diff: chrome/browser/resources/app_list/start_page.js

Issue 930243009: Add UMA for the app list doodle being clicked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uma
Patch Set: Created 5 years, 10 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 * @fileoverview App launcher start page implementation. 6 * @fileoverview App launcher start page implementation.
7 */ 7 */
8 8
9 <include src="speech_manager.js"> 9 <include src="speech_manager.js">
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 setDoodleVisible(true); 105 setDoodleVisible(true);
106 }; 106 };
107 doodleImage.src = doodleData.transparent_large_image.url; 107 doodleImage.src = doodleData.transparent_large_image.url;
108 108
109 if (doodleData.target_url) { 109 if (doodleData.target_url) {
110 var doodleLink = document.createElement('a'); 110 var doodleLink = document.createElement('a');
111 doodleLink.id = 'doodle_link'; 111 doodleLink.id = 'doodle_link';
112 doodleLink.href = doodleData.target_url; 112 doodleLink.href = doodleData.target_url;
113 doodleLink.target = '_blank'; 113 doodleLink.target = '_blank';
114 doodleLink.appendChild(doodleImage); 114 doodleLink.appendChild(doodleImage);
115 doodleLink.onclick = function() {
116 chrome.send('doodleClicked');
117 return true;
118 };
115 this.doodle.appendChild(doodleLink); 119 this.doodle.appendChild(doodleLink);
116 } else { 120 } else {
117 this.doodle.appendChild(doodleImage); 121 this.doodle.appendChild(doodleImage);
118 } 122 }
119 $('logo_container').appendChild(this.doodle); 123 $('logo_container').appendChild(this.doodle);
120 } 124 }
121 125
122 /** 126 /**
123 * Invoked when the app-list bubble is hidden. 127 * Invoked when the app-list bubble is hidden.
124 */ 128 */
(...skipping 15 matching lines...) Expand all
140 setNaclArch: setNaclArch, 144 setNaclArch: setNaclArch,
141 onAppListDoodleUpdated: onAppListDoodleUpdated, 145 onAppListDoodleUpdated: onAppListDoodleUpdated,
142 onAppListShown: onAppListShown, 146 onAppListShown: onAppListShown,
143 onAppListHidden: onAppListHidden, 147 onAppListHidden: onAppListHidden,
144 toggleSpeechRecognition: toggleSpeechRecognition 148 toggleSpeechRecognition: toggleSpeechRecognition
145 }; 149 };
146 }); 150 });
147 151
148 document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); 152 document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
149 document.addEventListener('DOMContentLoaded', appList.startPage.initialize); 153 document.addEventListener('DOMContentLoaded', appList.startPage.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698