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

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

Issue 1340493002: Add initial version of chrome://popular-sites-internals page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch_country_version
Patch Set: review3 Created 5 years, 3 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
(Empty)
1 // Copyright 2015 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
5 cr.define('chrome.popular_sites_internals', function() {
6 'use strict';
7
8 function initialize() {
9 function submitDownload(event) {
10 $('download-result').textContent = '';
11 chrome.send('download', [$('country-input').value,
12 $('version-input').value]);
13 event.preventDefault();
14 }
15
16 $('submit-download').addEventListener('click', submitDownload);
17
18 chrome.send('registerForEvents');
19 }
20
21 function receiveDownloadResult(result) {
22 $('download-result').textContent = result;
23 }
24
25 function receiveSites(sites) {
26 jstProcess(new JsEvalContext(sites), $('sites'));
27 }
28
29 // Return an object with all of the exports.
30 return {
31 initialize: initialize,
32 receiveDownloadResult: receiveDownloadResult,
33 receiveSites: receiveSites,
34 };
35 });
36
37 document.addEventListener('DOMContentLoaded',
38 chrome.popular_sites_internals.initialize);
39
OLDNEW
« no previous file with comments | « chrome/browser/resources/popular_sites_internals.html ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698