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

Unified Diff: content/browser/resources/service_worker/serviceworker_internals.js

Issue 568403002: Unify shared and service workers in chrome://inspect, remove service workers iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, review fixes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/resources/service_worker/serviceworker_internals.js
diff --git a/content/browser/resources/service_worker/serviceworker_internals.js b/content/browser/resources/service_worker/serviceworker_internals.js
index 3eda10f5acff08e628bd63fd1697401d86e8a608..23e898304a05a97cb312f40ca4390c7bfec3a987 100644
--- a/content/browser/resources/service_worker/serviceworker_internals.js
+++ b/content/browser/resources/service_worker/serviceworker_internals.js
@@ -6,20 +6,9 @@ cr.define('serviceworker', function() {
'use strict';
function initialize() {
- if (window.location.hash == "#iframe") {
- // This page is loaded from chrome://inspect.
- window.addEventListener('message', onMessage.bind(this), false);
- }
update();
}
- function onMessage(event) {
- if (event.origin != 'chrome://inspect') {
- return;
- }
- sendCommand(event.data.action, event.data.worker);
- }
-
function update() {
chrome.send('GetOptions');
chrome.send('getAllRegistrations');
@@ -85,31 +74,6 @@ cr.define('serviceworker', function() {
update();
}
- // Send the active ServiceWorker information to chrome://inspect.
- function sendToInspectPage(live_registrations,
- partition_id) {
- var workers = [];
- live_registrations.forEach(function(registration) {
- [registration.active, registration.waiting].forEach(function(version) {
- if (!version || version.running_status != 'RUNNING') {
- return;
- }
- workers.push({
- 'scope': registration.scope,
- 'url': version.script_url,
- 'partition_id': partition_id,
- 'version_id': version.version_id,
- 'process_id': version.process_id,
- 'devtools_agent_route_id':
- version.devtools_agent_route_id
- });
- });
- });
- window.parent.postMessage(
- {'partition_id': partition_id, 'workers': workers},
- 'chrome://inspect');
- }
-
var allLogMessages = {};
// Set log for a worker version.
function fillLogForVersion(partition_id, version) {
@@ -171,11 +135,6 @@ cr.define('serviceworker', function() {
stored_registrations,
partition_id,
partition_path) {
- if (window.location.hash == "#iframe") {
- // This page is loaded from chrome://inspect.
- sendToInspectPage(live_registrations, partition_id);
- return;
- }
var unregistered_registrations = [];
var unregistered_versions = [];
getUnregisteredWorkers(stored_registrations,

Powered by Google App Engine
This is Rietveld 408576698