OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 Runtime.experiments.register("applyCustomStylesheet", "Allow custom UI t
hemes"); | 83 Runtime.experiments.register("applyCustomStylesheet", "Allow custom UI t
hemes"); |
84 Runtime.experiments.register("blackboxJSFramesOnTimeline", "Blackbox Jav
aScript frames on Timeline", true); | 84 Runtime.experiments.register("blackboxJSFramesOnTimeline", "Blackbox Jav
aScript frames on Timeline", true); |
85 Runtime.experiments.register("colorContrastRatio", "Contrast ratio line
in color picker", true); | 85 Runtime.experiments.register("colorContrastRatio", "Contrast ratio line
in color picker", true); |
86 Runtime.experiments.register("continueToFirstInvocation", "Continue to f
irst invocation", true); | 86 Runtime.experiments.register("continueToFirstInvocation", "Continue to f
irst invocation", true); |
87 Runtime.experiments.register("emptySourceMapAutoStepping", "Empty source
map auto-stepping"); | 87 Runtime.experiments.register("emptySourceMapAutoStepping", "Empty source
map auto-stepping"); |
88 Runtime.experiments.register("inputEventsOnTimelineOverview", "Input eve
nts on Timeline overview", true); | 88 Runtime.experiments.register("inputEventsOnTimelineOverview", "Input eve
nts on Timeline overview", true); |
89 Runtime.experiments.register("layersPanel", "Layers panel"); | 89 Runtime.experiments.register("layersPanel", "Layers panel"); |
90 Runtime.experiments.register("layoutEditor", "Layout editor", true); | 90 Runtime.experiments.register("layoutEditor", "Layout editor", true); |
91 Runtime.experiments.register("inspectTooltip", "Dark inspect element too
ltip"); | 91 Runtime.experiments.register("inspectTooltip", "Dark inspect element too
ltip"); |
92 Runtime.experiments.register("liveSASS", "Live SASS"); | 92 Runtime.experiments.register("liveSASS", "Live SASS"); |
| 93 Runtime.experiments.register("nodeDebugging", "Node debugging", true); |
93 Runtime.experiments.register("privateScriptInspection", "Private script
inspection"); | 94 Runtime.experiments.register("privateScriptInspection", "Private script
inspection"); |
94 Runtime.experiments.register("requestBlocking", "Request blocking", true
); | 95 Runtime.experiments.register("requestBlocking", "Request blocking", true
); |
95 Runtime.experiments.register("resolveVariableNames", "Resolve variable n
ames"); | 96 Runtime.experiments.register("resolveVariableNames", "Resolve variable n
ames"); |
96 Runtime.experiments.register("timelineShowAllEvents", "Show all events o
n Timeline", true); | 97 Runtime.experiments.register("timelineShowAllEvents", "Show all events o
n Timeline", true); |
97 Runtime.experiments.register("timelineShowAllProcesses", "Show all proce
sses on Timeline", true); | 98 Runtime.experiments.register("timelineShowAllProcesses", "Show all proce
sses on Timeline", true); |
98 Runtime.experiments.register("securityPanel", "Security panel"); | 99 Runtime.experiments.register("securityPanel", "Security panel"); |
99 Runtime.experiments.register("sourceDiff", "Source diff"); | 100 Runtime.experiments.register("sourceDiff", "Source diff"); |
100 Runtime.experiments.register("timelineFlowEvents", "Timeline flow events
", true); | 101 Runtime.experiments.register("timelineFlowEvents", "Timeline flow events
", true); |
101 Runtime.experiments.register("timelineInvalidationTracking", "Timeline i
nvalidation tracking", true); | 102 Runtime.experiments.register("timelineInvalidationTracking", "Timeline i
nvalidation tracking", true); |
102 Runtime.experiments.register("timelineRecordingPerspectives", "Timeline
recording perspectives UI"); | 103 Runtime.experiments.register("timelineRecordingPerspectives", "Timeline
recording perspectives UI"); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E
vents.ReloadInspectedPage, this._reloadInspectedPage, this); | 310 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E
vents.ReloadInspectedPage, this._reloadInspectedPage, this); |
310 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E
vents.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); | 311 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E
vents.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); |
311 | 312 |
312 this._mainTarget.runtimeAgent().runIfWaitingForDebugger(); | 313 this._mainTarget.runtimeAgent().runIfWaitingForDebugger(); |
313 | 314 |
314 if (this._mainTarget.hasBrowserCapability()) | 315 if (this._mainTarget.hasBrowserCapability()) |
315 this._mainTarget.inspectorAgent().enable(); | 316 this._mainTarget.inspectorAgent().enable(); |
316 InspectorFrontendHost.readyForTest(); | 317 InspectorFrontendHost.readyForTest(); |
317 | 318 |
318 // Asynchronously run the extensions. | 319 // Asynchronously run the extensions. |
319 setTimeout(lateInitialization, 0); | 320 setTimeout(lateInitialization.bind(this), 0); |
320 | 321 |
| 322 /** |
| 323 * @this {WebInspector.Main} |
| 324 */ |
321 function lateInitialization() | 325 function lateInitialization() |
322 { | 326 { |
323 console.timeStamp("Main.lateInitialization"); | 327 console.timeStamp("Main.lateInitialization"); |
324 WebInspector.extensionServer.initializeExtensions(); | 328 WebInspector.extensionServer.initializeExtensions(); |
| 329 if (Runtime.experiments.isEnabled("nodeDebugging")) |
| 330 new WebInspector.RemoteLocationManager(this._mainTarget); |
325 } | 331 } |
326 }, | 332 }, |
327 | 333 |
328 _registerForwardedShortcuts: function() | 334 _registerForwardedShortcuts: function() |
329 { | 335 { |
330 /** @const */ var forwardedActions = ["main.toggle-dock", "debugger.togg
le-breakpoints-active", "debugger.toggle-pause", "commandMenu.show"]; | 336 /** @const */ var forwardedActions = ["main.toggle-dock", "debugger.togg
le-breakpoints-active", "debugger.toggle-pause", "commandMenu.show"]; |
331 var actionKeys = WebInspector.shortcutRegistry.keysForActions(forwardedA
ctions).map(WebInspector.KeyboardShortcut.keyCodeAndModifiersFromKey); | 337 var actionKeys = WebInspector.shortcutRegistry.keysForActions(forwardedA
ctions).map(WebInspector.KeyboardShortcut.keyCodeAndModifiersFromKey); |
332 InspectorFrontendHost.setWhitelistedShortcuts(JSON.stringify(actionKeys)
); | 338 InspectorFrontendHost.setWhitelistedShortcuts(JSON.stringify(actionKeys)
); |
333 }, | 339 }, |
334 | 340 |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 * @override | 1104 * @override |
1099 * @return {?Element} | 1105 * @return {?Element} |
1100 */ | 1106 */ |
1101 settingElement: function() | 1107 settingElement: function() |
1102 { | 1108 { |
1103 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); | 1109 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); |
1104 } | 1110 } |
1105 } | 1111 } |
1106 | 1112 |
1107 new WebInspector.Main(); | 1113 new WebInspector.Main(); |
OLD | NEW |