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

Side by Side Diff: chrome/browser/resources/about_flash.js

Issue 10860031: Cleanup: Remove empty array param from chrome.send('x', []). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 /** 5 /**
2 * Takes the |moduleListData| input argument which represents data about 6 * Takes the |moduleListData| input argument which represents data about
3 * the currently available modules and populates the html jstemplate 7 * the currently available modules and populates the html jstemplate
4 * with that data. It expects an object structure like the above. 8 * with that data. It expects an object structure like the above.
5 * @param {Object} moduleListData Information about available modules 9 * @param {Object} moduleListData Information about available modules
6 */ 10 */
7 function renderTemplate(moduleListData) { 11 function renderTemplate(moduleListData) {
8 // This is the javascript code that processes the template: 12 // This is the javascript code that processes the template:
9 var input = new JsEvalContext(moduleListData); 13 var input = new JsEvalContext(moduleListData);
10 var output = document.getElementById('flashInfoTemplate'); 14 var output = $('flashInfoTemplate');
11 jstProcess(input, output); 15 jstProcess(input, output);
12 } 16 }
13 17
14 /** 18 /**
15 * Asks the C++ FlashUIDOMHandler to get details about the Flash and return 19 * Asks the C++ FlashUIDOMHandler to get details about the Flash and return
16 * the data in returnFlashInfo() (below). 20 * the data in returnFlashInfo() (below).
17 */ 21 */
18 function requestFlashInfo() { 22 function requestFlashInfo() {
19 chrome.send('requestFlashInfo', []); 23 chrome.send('requestFlashInfo');
20 } 24 }
21 25
22 /** 26 /**
23 * Called by the WebUI to re-populate the page with data representing the 27 * Called by the WebUI to re-populate the page with data representing the
24 * current state of Flash. 28 * current state of Flash.
29 * @param {Object} moduleListData Information about available modules.
25 */ 30 */
26 function returnFlashInfo(moduleListData) { 31 function returnFlashInfo(moduleListData) {
27 document.getElementById('loading-message').style.visibility = 'hidden'; 32 $('loading-message').style.visibility = 'hidden';
28 document.getElementById('body-container').style.visibility = 'visible'; 33 $('body-container').style.visibility = 'visible';
29 renderTemplate(moduleListData); 34 renderTemplate(moduleListData);
30 } 35 }
31 36
32 // Get data and have it displayed upon loading. 37 // Get data and have it displayed upon loading.
33 document.addEventListener('DOMContentLoaded', requestFlashInfo); 38 document.addEventListener('DOMContentLoaded', requestFlashInfo);
34
OLDNEW
« no previous file with comments | « chrome/browser/resources/about_flash.html ('k') | chrome/browser/resources/chromeos/host_registration_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698