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

Side by Side Diff: Source/devtools/front_end/main/Main.js

Issue 1355423003: Devtools: initialize protocol enums synchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed WebInspector._connectionForTests Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 /** 304 /**
305 * @param {!WebInspector.Event} event 305 * @param {!WebInspector.Event} event
306 */ 306 */
307 function onDisconnected(event) 307 function onDisconnected(event)
308 { 308 {
309 if (WebInspector._disconnectedScreenWithReasonWasShown) 309 if (WebInspector._disconnectedScreenWithReasonWasShown)
310 return; 310 return;
311 new WebInspector.RemoteDebuggingTerminatedScreen(event.data.reason). showModal(); 311 new WebInspector.RemoteDebuggingTerminatedScreen(event.data.reason). showModal();
312 } 312 }
313 313
314 InspectorBackend.setConnection(connection);
315 var targetType = Runtime.queryParam("isSharedWorker") ? WebInspector.Tar get.Type.ServiceWorker : WebInspector.Target.Type.Page; 314 var targetType = Runtime.queryParam("isSharedWorker") ? WebInspector.Tar get.Type.ServiceWorker : WebInspector.Target.Type.Page;
316 WebInspector.targetManager.createTarget(WebInspector.UIString("Main"), t argetType, connection, null, this._mainTargetCreated.bind(this)); 315 WebInspector.targetManager.createTarget(WebInspector.UIString("Main"), t argetType, connection, null, this._mainTargetCreated.bind(this));
317 }, 316 },
318 317
319 /** 318 /**
320 * @param {?WebInspector.Target} target 319 * @param {?WebInspector.Target} target
321 */ 320 */
322 _mainTargetCreated: function(target) 321 _mainTargetCreated: function(target)
323 { 322 {
324 console.timeStamp("Main._mainTargetCreated"); 323 console.timeStamp("Main._mainTargetCreated");
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 p.classList.add("help-section"); 967 p.classList.add("help-section");
969 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically."); 968 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically.");
970 } 969 }
971 970
972 WebInspector.WorkerTerminatedScreen.prototype = { 971 WebInspector.WorkerTerminatedScreen.prototype = {
973 972
974 __proto__: WebInspector.HelpScreen.prototype 973 __proto__: WebInspector.HelpScreen.prototype
975 } 974 }
976 975
977 new WebInspector.Main(); 976 new WebInspector.Main();
OLDNEW
« no previous file with comments | « LayoutTests/inspector/report-API-errors.html ('k') | Source/devtools/front_end/main/TestController.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698