Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: chromeDevenvPoller__.js.tmpl

Issue 9051052: Changes to Chrome build process (Closed)
Left Patch Set: Fixed jshydra failures Created Dec. 20, 2012, 2:21 p.m.
Right Patch Set: Moved JSHydra dependency to build tools and added automatic devenv reloading Created Dec. 29, 2012, 8:14 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « build.py ('k') | manifest.json.tmpl » ('j') | packagerChrome.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 (function()
2 {
3 var basename = {{metadata.get("general", "basename")|json}};
4
5 function doPoll()
6 {
7 var request = new XMLHttpRequest();
8 request.open("GET", "http://localhost:43816/");
9 request.addEventListener("load", function()
10 {
11 if (request.responseText != basename)
12 return;
13
14 var views = chrome.extension.getViews();
15 for (var i = 0; i < views.length; i++)
16 if (views[i] != window)
17 views[i].close();
18 window.location.reload();
19 }, false);
20 request.send(null);
21
22 window.setTimeout(doPoll, 5000);
23 }
24
25 // Delay first poll to prevent reloading again immediately after a reload
26 window.setTimeout(doPoll, 10000);
27 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld