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

Side by Side Diff: Source/devtools/front_end/components/WorkerFrontendManager.js

Issue 423673004: [DevTools] Switch from separate sendMessageToBackend method to using embedder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }, 74 },
75 75
76 _handleMessage: function(event) 76 _handleMessage: function(event)
77 { 77 {
78 var data = /** @type {{workerId: string, command: string, message: !Obje ct}} */ (event.data); 78 var data = /** @type {{workerId: string, command: string, message: !Obje ct}} */ (event.data);
79 var workerId = data["workerId"]; 79 var workerId = data["workerId"];
80 workerId = parseInt(workerId, 10); 80 workerId = parseInt(workerId, 10);
81 var command = data.command; 81 var command = data.command;
82 var message = data.message; 82 var message = data.message;
83 83
84 if (command == "sendMessageToBackend") 84 if (command == "sendMessageToWorker")
85 WorkerAgent.sendMessageToWorker(workerId, message); 85 WorkerAgent.sendMessageToWorker(workerId, message);
86 }, 86 },
87 87
88 _sendMessageToWorkerInspector: function(event) 88 _sendMessageToWorkerInspector: function(event)
89 { 89 {
90 var data = (event.data); 90 var data = (event.data);
91 91
92 var workerInspectorWindow = this._workerIdToWindow[data.workerId]; 92 var workerInspectorWindow = this._workerIdToWindow[data.workerId];
93 if (workerInspectorWindow) 93 if (workerInspectorWindow)
94 workerInspectorWindow.postMessage(data.message, "*"); 94 workerInspectorWindow.postMessage(data.message, "*");
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 WorkerAgent.disconnectFromWorker(parseInt(workerId, 10)); 163 WorkerAgent.disconnectFromWorker(parseInt(workerId, 10));
164 } 164 }
165 } 165 }
166 166
167 } 167 }
168 /** 168 /**
169 * @type {?WebInspector.WorkerFrontendManager} 169 * @type {?WebInspector.WorkerFrontendManager}
170 */ 170 */
171 WebInspector.workerFrontendManager = null; 171 WebInspector.workerFrontendManager = null;
172 172
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorFrontendHost.idl ('k') | Source/devtools/front_end/host/InspectorFrontendHost.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698