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

Side by Side Diff: content/browser/resources/service_worker/serviceworker_internals.js

Issue 1617143002: Remove "push" button from service worker internals UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('serviceworker', function() { 5 cr.define('serviceworker', function() {
6 'use strict'; 6 'use strict';
7 7
8 function initialize() { 8 function initialize() {
9 update(); 9 update();
10 } 10 }
(...skipping 24 matching lines...) Expand all
35 inputs[i].hasClickEvent = true; 35 inputs[i].hasClickEvent = true;
36 } 36 }
37 } 37 }
38 } 38 }
39 39
40 function progressNodeFor(link) { 40 function progressNodeFor(link) {
41 return link.parentNode.querySelector('.operation-status'); 41 return link.parentNode.querySelector('.operation-status');
42 } 42 }
43 43
44 // All commands are completed with 'onOperationComplete'. 44 // All commands are completed with 'onOperationComplete'.
45 var COMMANDS = ['stop', 'push', 'inspect', 'unregister', 'start']; 45 var COMMANDS = ['stop', 'inspect', 'unregister', 'start'];
46 function commandHandler(command) { 46 function commandHandler(command) {
47 return function(event) { 47 return function(event) {
48 var link = event.target; 48 var link = event.target;
49 progressNodeFor(link).style.display = 'inline'; 49 progressNodeFor(link).style.display = 'inline';
50 sendCommand(command, link.cmdArgs, (function(status) { 50 sendCommand(command, link.cmdArgs, (function(status) {
51 progressNodeFor(link).style.display = 'none'; 51 progressNodeFor(link).style.display = 'none';
52 }).bind(null, link)); 52 }).bind(null, link));
53 return false; 53 return false;
54 }; 54 };
55 }; 55 };
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 onRunningStateChanged: onRunningStateChanged, 257 onRunningStateChanged: onRunningStateChanged,
258 onErrorReported: onErrorReported, 258 onErrorReported: onErrorReported,
259 onConsoleMessageReported: onConsoleMessageReported, 259 onConsoleMessageReported: onConsoleMessageReported,
260 onVersionStateChanged: onVersionStateChanged, 260 onVersionStateChanged: onVersionStateChanged,
261 onRegistrationStored: onRegistrationStored, 261 onRegistrationStored: onRegistrationStored,
262 onRegistrationDeleted: onRegistrationDeleted, 262 onRegistrationDeleted: onRegistrationDeleted,
263 }; 263 };
264 }); 264 });
265 265
266 document.addEventListener('DOMContentLoaded', serviceworker.initialize); 266 document.addEventListener('DOMContentLoaded', serviceworker.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698