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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerManager.js

Issue 1922073002: DevTools: polish service worker inspector UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined test Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 /** 85 /**
86 * @return {!Iterable.<!WebInspector.ServiceWorker>} 86 * @return {!Iterable.<!WebInspector.ServiceWorker>}
87 */ 87 */
88 workers: function() 88 workers: function()
89 { 89 {
90 return this._workers.values(); 90 return this._workers.values();
91 }, 91 },
92 92
93 /** 93 /**
94 * @param {string} versionId
95 * @return {boolean}
96 */
97 hasWorkerWithVersionId: function(versionId)
98 {
99 for (var pair of this._workers) {
100 if (pair[1]._versionId === versionId)
101 return true;
102 }
103 return false;
104 },
105
106 /**
94 * @return {boolean} 107 * @return {boolean}
95 */ 108 */
96 hasWorkers: function() 109 hasWorkers: function()
97 { 110 {
98 return !!this._workers.size; 111 return !!this._workers.size;
99 }, 112 },
100 113
101 /** 114 /**
102 * @return {!Map.<string, !WebInspector.ServiceWorkerRegistration>} 115 * @return {!Map.<string, !WebInspector.ServiceWorkerRegistration>}
103 */ 116 */
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 }, 873 },
861 874
862 /** 875 /**
863 * @return {boolean} 876 * @return {boolean}
864 */ 877 */
865 _shouldBeRemoved: function() 878 _shouldBeRemoved: function()
866 { 879 {
867 return this._isRedundant() && (!this._hasErrorLog() || this._deleting); 880 return this._isRedundant() && (!this._hasErrorLog() || this._deleting);
868 } 881 }
869 } 882 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698