| Index: chrome/browser/resources/popular_sites_internals.js
|
| diff --git a/chrome/browser/resources/popular_sites_internals.js b/chrome/browser/resources/popular_sites_internals.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..24c4bed10edfe7cf097b2bcc0b3f42a29660b306
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/popular_sites_internals.js
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +cr.define('chrome.popular_sites_internals', function() {
|
| + 'use strict';
|
| +
|
| + function initialize() {
|
| + function submitDownload(event) {
|
| + $('download-result').textContent = '';
|
| + chrome.send('download', [$('country-input').value,
|
| + $('version-input').value]);
|
| + event.preventDefault();
|
| + }
|
| +
|
| + $('submit-download').addEventListener('click', submitDownload);
|
| +
|
| + chrome.send('registerForEvents');
|
| + }
|
| +
|
| + function receiveDownloadResult(result) {
|
| + $('download-result').textContent = result;
|
| + }
|
| +
|
| + function receiveSites(sites) {
|
| + jstProcess(new JsEvalContext(sites), $('sites'));
|
| + }
|
| +
|
| + // Return an object with all of the exports.
|
| + return {
|
| + initialize: initialize,
|
| + receiveDownloadResult: receiveDownloadResult,
|
| + receiveSites: receiveSites,
|
| + };
|
| +});
|
| +
|
| +document.addEventListener('DOMContentLoaded',
|
| + chrome.popular_sites_internals.initialize);
|
| +
|
|
|