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

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

Issue 961553002: Enable right clicking on the applist doodle web contents and log the data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
11 cr.define('appList.startPage', function() { 11 cr.define('appList.startPage', function() {
12 'use strict'; 12 'use strict';
13 13
14 var speechManager = null; 14 var speechManager = null;
15 15
16 // The element containing the current Google Doodle. 16 // The element containing the current Google Doodle.
17 var doodle = null; 17 var doodle = null;
18 var doodleData = null;
18 19
19 /** 20 /**
20 * Initialize the page. 21 * Initialize the page.
21 */ 22 */
22 function initialize() { 23 function initialize() {
23 speechManager = new speech.SpeechManager(); 24 speechManager = new speech.SpeechManager();
24 chrome.send('initialize'); 25 chrome.send('initialize');
25 } 26 }
26 27
27 /** 28 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 * Invoked when the app-list doodle is updated. 77 * Invoked when the app-list doodle is updated.
77 * 78 *
78 * @param {Object} data The data object representing the current doodle. 79 * @param {Object} data The data object representing the current doodle.
79 */ 80 */
80 function onAppListDoodleUpdated(data, base_url) { 81 function onAppListDoodleUpdated(data, base_url) {
81 if (this.doodle) { 82 if (this.doodle) {
82 this.doodle.parentNode.removeChild(this.doodle); 83 this.doodle.parentNode.removeChild(this.doodle);
83 this.doodle = null; 84 this.doodle = null;
84 } 85 }
85 86
87 this.doodleData = data.ddljson;
Matt Giuca 2015/02/26 03:07:08 You aren't using this any more? (Since you seem to
Matt Giuca 2015/02/26 03:09:28 OK, then 1. Add a TODO explaining that this is for
calamity 2015/02/26 03:27:25 Keeping it here for inspection purposes.
86 var doodleData = data.ddljson; 88 var doodleData = data.ddljson;
87 if (!doodleData || !doodleData.transparent_large_image) { 89 if (!doodleData || !doodleData.transparent_large_image) {
88 setDoodleVisible(false); 90 setDoodleVisible(false);
89 return; 91 return;
90 } 92 }
91 93
92 // Set the page's base URL so that links will resolve relative to the Google 94 // Set the page's base URL so that links will resolve relative to the Google
93 // homepage. 95 // homepage.
94 $('base').href = base_url; 96 $('base').href = base_url;
95 97
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 initialize: initialize, 147 initialize: initialize,
146 setHotwordEnabled: setHotwordEnabled, 148 setHotwordEnabled: setHotwordEnabled,
147 setNaclArch: setNaclArch, 149 setNaclArch: setNaclArch,
148 onAppListDoodleUpdated: onAppListDoodleUpdated, 150 onAppListDoodleUpdated: onAppListDoodleUpdated,
149 onAppListShown: onAppListShown, 151 onAppListShown: onAppListShown,
150 onAppListHidden: onAppListHidden, 152 onAppListHidden: onAppListHidden,
151 toggleSpeechRecognition: toggleSpeechRecognition 153 toggleSpeechRecognition: toggleSpeechRecognition
152 }; 154 };
153 }); 155 });
154 156
155 document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
156 document.addEventListener('DOMContentLoaded', appList.startPage.initialize); 157 document.addEventListener('DOMContentLoaded', appList.startPage.initialize);
Matt Giuca 2015/02/26 03:07:08 // TODO(calamity): Uncomment this line to suppress
calamity 2015/02/26 03:27:25 Did what was discussed.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/start_page_service.cc » ('j') | chrome/browser/ui/app_list/start_page_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698