Chromium Code Reviews

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

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 192 matching lines...)
203 WebInspector.fileManager = new WebInspector.FileManager(); 203 WebInspector.fileManager = new WebInspector.FileManager();
204 WebInspector.isolatedFileSystemManager = new WebInspector.IsolatedFileSy stemManager(); 204 WebInspector.isolatedFileSystemManager = new WebInspector.IsolatedFileSy stemManager();
205 WebInspector.workspace = new WebInspector.Workspace(WebInspector.isolate dFileSystemManager.mapping()); 205 WebInspector.workspace = new WebInspector.Workspace(WebInspector.isolate dFileSystemManager.mapping());
206 WebInspector.networkMapping = new WebInspector.NetworkMapping(WebInspect or.workspace, WebInspector.isolatedFileSystemManager.mapping()); 206 WebInspector.networkMapping = new WebInspector.NetworkMapping(WebInspect or.workspace, WebInspector.isolatedFileSystemManager.mapping());
207 WebInspector.networkProjectManager = new WebInspector.NetworkProjectMana ger(WebInspector.targetManager, WebInspector.workspace, WebInspector.networkMapp ing); 207 WebInspector.networkProjectManager = new WebInspector.NetworkProjectMana ger(WebInspector.targetManager, WebInspector.workspace, WebInspector.networkMapp ing);
208 WebInspector.presentationConsoleMessageHelper = new WebInspector.Present ationConsoleMessageHelper(WebInspector.workspace); 208 WebInspector.presentationConsoleMessageHelper = new WebInspector.Present ationConsoleMessageHelper(WebInspector.workspace);
209 WebInspector.cssWorkspaceBinding = new WebInspector.CSSWorkspaceBinding( WebInspector.targetManager, WebInspector.workspace, WebInspector.networkMapping) ; 209 WebInspector.cssWorkspaceBinding = new WebInspector.CSSWorkspaceBinding( WebInspector.targetManager, WebInspector.workspace, WebInspector.networkMapping) ;
210 WebInspector.debuggerWorkspaceBinding = new WebInspector.DebuggerWorkspa ceBinding(WebInspector.targetManager, WebInspector.workspace, WebInspector.netwo rkMapping); 210 WebInspector.debuggerWorkspaceBinding = new WebInspector.DebuggerWorkspa ceBinding(WebInspector.targetManager, WebInspector.workspace, WebInspector.netwo rkMapping);
211 WebInspector.fileSystemWorkspaceBinding = new WebInspector.FileSystemWor kspaceBinding(WebInspector.isolatedFileSystemManager, WebInspector.workspace, We bInspector.networkMapping); 211 WebInspector.fileSystemWorkspaceBinding = new WebInspector.FileSystemWor kspaceBinding(WebInspector.isolatedFileSystemManager, WebInspector.workspace, We bInspector.networkMapping);
212 WebInspector.breakpointManager = new WebInspector.BreakpointManager(null , WebInspector.workspace, WebInspector.networkMapping, WebInspector.targetManage r, WebInspector.debuggerWorkspaceBinding); 212 WebInspector.breakpointManager = new WebInspector.BreakpointManager(null , WebInspector.workspace, WebInspector.networkMapping, WebInspector.targetManage r, WebInspector.debuggerWorkspaceBinding);
213 WebInspector.extensionServer = new WebInspector.ExtensionServer(); 213 WebInspector.extensionServer = new WebInspector.ExtensionServer(new WebI nspector.ExtensionServer.UIDelegateImpl());
214 214
215 new WebInspector.OverlayController(); 215 new WebInspector.OverlayController();
216 new WebInspector.ContentScriptProjectDecorator(); 216 new WebInspector.ContentScriptProjectDecorator();
217 new WebInspector.ExecutionContextSelector(WebInspector.targetManager, We bInspector.context); 217 new WebInspector.ExecutionContextSelector(WebInspector.targetManager, We bInspector.context);
218 218
219 var autoselectPanel = WebInspector.UIString("a panel chosen automaticall y"); 219 var autoselectPanel = WebInspector.UIString("a panel chosen automaticall y");
220 var openAnchorLocationSetting = WebInspector.settings.createSetting("ope nLinkHandler", autoselectPanel); 220 var openAnchorLocationSetting = WebInspector.settings.createSetting("ope nLinkHandler", autoselectPanel);
221 WebInspector.openAnchorLocationRegistry = new WebInspector.HandlerRegist ry(openAnchorLocationSetting); 221 WebInspector.openAnchorLocationRegistry = new WebInspector.HandlerRegist ry(openAnchorLocationSetting);
222 WebInspector.openAnchorLocationRegistry.registerHandler(autoselectPanel, function() { return false; }); 222 WebInspector.openAnchorLocationRegistry.registerHandler(autoselectPanel, function() { return false; });
223 WebInspector.Linkifier.setLinkHandler(new WebInspector.HandlerRegistry.L inkHandler()); 223 WebInspector.Linkifier.setLinkHandler(new WebInspector.HandlerRegistry.L inkHandler());
(...skipping 613 matching lines...)
837 var p = this.helpContentElement.createChild("p"); 837 var p = this.helpContentElement.createChild("p");
838 p.classList.add("help-section"); 838 p.classList.add("help-section");
839 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically."); 839 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically.");
840 } 840 }
841 841
842 WebInspector.WorkerTerminatedScreen.prototype = { 842 WebInspector.WorkerTerminatedScreen.prototype = {
843 843
844 __proto__: WebInspector.HelpScreen.prototype 844 __proto__: WebInspector.HelpScreen.prototype
845 } 845 }
846 846
847 /**
848 * @constructor
849 * @implements {WebInspector.ExtensionServer.UIDelegate}
850 */
851 WebInspector.ExtensionServer.UIDelegateImpl = function() {}
852 WebInspector.ExtensionServer.UIDelegateImpl.prototype = {
853
854 /**
855 * @override
856 * @param {!Array<string>} mimes
857 * @param {?} mode
858 */
859 addSimpleCodeMirrorMode: function(mimes, mode) {
860 self.runtime.loadModulePromise("source_frame").then(function() { //also not autoloaded (Though TBH this could just add waiting ones on start, rather th an loading it when we want to add one)
861 for (var i=0; i<mimes.length; i++) {
862 CodeMirror.defineSimpleMode(mimes[i], mode);
863 }
864 });
865 }
866 }
867
847 new WebInspector.Main(); 868 new WebInspector.Main();
OLDNEW
« no previous file with comments | « Source/devtools/front_end/languages/module.json ('k') | Source/devtools/front_end/resources/DatabaseQueryView.js » ('j') | no next file with comments »

Powered by Google App Engine