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

Side by Side Diff: Source/devtools/front_end/sdk/WorkerManager.js

Issue 1044203004: [Storage] Cache storage inspection on all the frames! (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: comments and rebase Created 5 years, 8 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 * @extends {InspectorBackendClass.Connection} 230 * @extends {InspectorBackendClass.Connection}
231 * @param {!WebInspector.WorkerManager} workerManager 231 * @param {!WebInspector.WorkerManager} workerManager
232 * @param {string} workerId 232 * @param {string} workerId
233 * @param {boolean} inspectorConnected 233 * @param {boolean} inspectorConnected
234 * @param {function(!InspectorBackendClass.Connection)} onConnectionReady 234 * @param {function(!InspectorBackendClass.Connection)} onConnectionReady
235 */ 235 */
236 WebInspector.WorkerConnection = function(workerManager, workerId, inspectorConne cted, onConnectionReady) 236 WebInspector.WorkerConnection = function(workerManager, workerId, inspectorConne cted, onConnectionReady)
237 { 237 {
238 InspectorBackendClass.Connection.call(this); 238 InspectorBackendClass.Connection.call(this);
239 //FIXME: remove resourceTreeModel and others from worker targets 239 //FIXME: remove resourceTreeModel and others from worker targets
240 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage", "Database", "Network", "IndexedDB", "ServiceWorkerCache"]); 240 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage", "Database", "Network", "IndexedDB"]);
241 this._agent = workerManager.target().workerAgent(); 241 this._agent = workerManager.target().workerAgent();
242 this._workerId = workerId; 242 this._workerId = workerId;
243 243
244 244
245 if (!inspectorConnected) 245 if (!inspectorConnected)
246 this._agent.connectToWorker(workerId, onConnectionReady.bind(null, this) ); 246 this._agent.connectToWorker(workerId, onConnectionReady.bind(null, this) );
247 else 247 else
248 onConnectionReady.call(null, this); 248 onConnectionReady.call(null, this);
249 } 249 }
250 250
251 WebInspector.WorkerConnection.prototype = { 251 WebInspector.WorkerConnection.prototype = {
252 /** 252 /**
253 * @override 253 * @override
254 * @param {!Object} messageObject 254 * @param {!Object} messageObject
255 */ 255 */
256 sendMessage: function(messageObject) 256 sendMessage: function(messageObject)
257 { 257 {
258 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb ject)); 258 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb ject));
259 }, 259 },
260 260
261 _close: function() 261 _close: function()
262 { 262 {
263 this.connectionClosed("worker_terminated"); 263 this.connectionClosed("worker_terminated");
264 }, 264 },
265 265
266 __proto__: InspectorBackendClass.Connection.prototype 266 __proto__: InspectorBackendClass.Connection.prototype
267 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698