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

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

Issue 2557103004: Add chrome://site-tiles-internals/ (Closed)
Patch Set: rebase 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 2016 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.ntp_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 chrome.send('update', [{
14 "popular": {
15 "overrideURL": $('override-url').value,
16 "overrideCountry": $('override-country').value,
17 "overrideVersion": $('override-version').value,
18 },
19 }])
20 });
21
22 chrome.send('registerForEvents');
23 }
24
25 var receiveSourceInfo = function(state) {
26 jstProcess(new JsEvalContext(state), $('sources'));
27 }
28
29 var receiveSites = function(sites) {
30 jstProcess(new JsEvalContext(sites), $('sites'));
31 }
32
33 // Return an object with all of the exports.
34 return {
35 initialize: initialize,
36 receiveSourceInfo: receiveSourceInfo,
37 receiveSites: receiveSites,
38 };
39 });
40
41 document.addEventListener('DOMContentLoaded',
42 chrome.ntp_tiles_internals.initialize);
43
OLDNEW
« no previous file with comments | « components/ntp_tiles/webui/resources/ntp_tiles_internals.html ('k') | components/resources/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698