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

Side by Side Diff: components/physical_web/webui/resources/physical_web.js

Issue 2248913007: Add a Physical Web WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
1 // Copyright (c) 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 /**
6 * Takes the |nearbyUrlsData| input argument which holds metadata for web pages
7 * broadcast by nearby devices.
8 * @param {Object} nearbyUrlsData Information about web pages broadcast by
9 * nearby devices
10 */
11 function renderTemplate(nearbyUrlsData) {
12 // This is the javascript code that processes the template:
13 jstProcess(new JsEvalContext(nearbyUrlsData), $('physicalWebTemplate'));
14 }
15
16 function requestNearbyURLs() {
17 chrome.send('requestNearbyURLs');
18 }
19
20 function handleClickPhysicalWebItem(node) {
21 // do something
22 }
23
24 function returnNearbyURLs(nearbyUrlsData) {
25 var bodyContainer = $('body-container');
26 renderTemplate(nearbyUrlsData);
27
28 bodyContainer.style.visibility = 'visible';
29 }
30
31 document.addEventListener('DOMContentLoaded', requestNearbyURLs);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698