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

Side by Side Diff: components/ntp_tiles/webui/resources/site_tiles_internals.js

Issue 2557103004: Add chrome://site-tiles-internals/ (Closed)
Patch Set: Fix gn check Created 4 years 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.site_tiles_internals', function() {
6 'use strict';
7
8 var initialize = function() {
9 receiveSites({});
10
11 $('submit-update').addEventListener('click', function(event) {
12 event.preventDefault();
13 /*
14 $('download-result').textContent = '';
15 */
16 chrome.send('update', [{
17 "popular": {
18 "overrideURL": $('override-url').value,
19 "overrideCountry": $('override-country').value,
20 "overrideVersion": $('override-version').value,
21 },
22 }])
23 });
24
25 /*
26 $('view-json').addEventListener('click', function(event) {
27 $('json-value').textContent = '';
28 chrome.send('viewJson');
29 event.preventDefault();
30 });
31 */
Marc Treib 2016/12/08 15:41:50 Either implement or remove all the commented-out p
sfiera 2016/12/08 16:44:35 Removed.
32
33 chrome.send('registerForEvents');
34 }
35
36 var receiveSourceInfo = function(state) {
37 jstProcess(new JsEvalContext(state), $('sources'));
38 }
39
40 var receiveSites = function(sites) {
41 jstProcess(new JsEvalContext(sites), $('sites'));
42 /*
43 // Also clear the json string, since it's likely stale now.
44 $('json-value').textContent = '';
45 */
46 }
47
48 /*
49 var receiveDownloadResult = function(result) {
50 $('download-result').textContent = result;
51 }
52
53 var receiveJson = function(json) {
54 $('json-value').textContent = json;
55 }
56 */
57
58 // Return an object with all of the exports.
59 return {
60 initialize: initialize,
61 receiveSourceInfo: receiveSourceInfo,
62 receiveSites: receiveSites,
63 /*
64 receiveDownloadResult: receiveDownloadResult,
65 receiveJson: receiveJson,
66 */
67 };
68 });
69
70 document.addEventListener('DOMContentLoaded',
71 chrome.site_tiles_internals.initialize);
72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698