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: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2512013002: [DevTools] Handle external link clicks and context menu separately. (Closed)
Patch Set: formatting Created 4 years, 1 month 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 Workspace.fileManager = new Workspace.FileManager(); 184 Workspace.fileManager = new Workspace.FileManager();
185 Workspace.workspace = new Workspace.Workspace(); 185 Workspace.workspace = new Workspace.Workspace();
186 Common.formatterWorkerPool = new Common.FormatterWorkerPool(); 186 Common.formatterWorkerPool = new Common.FormatterWorkerPool();
187 Workspace.fileSystemMapping = new Workspace.FileSystemMapping(Workspace.isol atedFileSystemManager); 187 Workspace.fileSystemMapping = new Workspace.FileSystemMapping(Workspace.isol atedFileSystemManager);
188 188
189 var fileSystemWorkspaceBinding = 189 var fileSystemWorkspaceBinding =
190 new Bindings.FileSystemWorkspaceBinding(Workspace.isolatedFileSystemMana ger, Workspace.workspace); 190 new Bindings.FileSystemWorkspaceBinding(Workspace.isolatedFileSystemMana ger, Workspace.workspace);
191 Main.networkProjectManager = new Bindings.NetworkProjectManager(SDK.targetMa nager, Workspace.workspace); 191 Main.networkProjectManager = new Bindings.NetworkProjectManager(SDK.targetMa nager, Workspace.workspace);
192 Bindings.presentationConsoleMessageHelper = new Bindings.PresentationConsole MessageHelper(Workspace.workspace); 192 Bindings.presentationConsoleMessageHelper = new Bindings.PresentationConsole MessageHelper(Workspace.workspace);
193 Bindings.cssWorkspaceBinding = 193 Bindings.cssWorkspaceBinding = new Bindings.CSSWorkspaceBinding(SDK.targetMa nager, Workspace.workspace);
194 new Bindings.CSSWorkspaceBinding(SDK.targetManager, Workspace.workspace) ; 194 Bindings.debuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceBinding(SD K.targetManager, Workspace.workspace);
195 Bindings.debuggerWorkspaceBinding =
196 new Bindings.DebuggerWorkspaceBinding(SDK.targetManager, Workspace.works pace);
197 Bindings.breakpointManager = 195 Bindings.breakpointManager =
198 new Bindings.BreakpointManager(null, Workspace.workspace, SDK.targetMana ger, Bindings.debuggerWorkspaceBinding); 196 new Bindings.BreakpointManager(null, Workspace.workspace, SDK.targetMana ger, Bindings.debuggerWorkspaceBinding);
199 Extensions.extensionServer = new Extensions.ExtensionServer(); 197 Extensions.extensionServer = new Extensions.ExtensionServer();
200 198
201 Persistence.persistence = 199 Persistence.persistence =
202 new Persistence.Persistence(Workspace.workspace, Bindings.breakpointMana ger, Workspace.fileSystemMapping); 200 new Persistence.Persistence(Workspace.workspace, Bindings.breakpointMana ger, Workspace.fileSystemMapping);
203 201
204 new Main.OverlayController(); 202 new Main.OverlayController();
205 new Components.ExecutionContextSelector(SDK.targetManager, UI.context); 203 new Components.ExecutionContextSelector(SDK.targetManager, UI.context);
206 Bindings.blackboxManager = new Bindings.BlackboxManager(Bindings.debuggerWor kspaceBinding); 204 Bindings.blackboxManager = new Bindings.BlackboxManager(Bindings.debuggerWor kspaceBinding);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 382 }
385 383
386 var request = SDK.NetworkLog.requestForURL(anchor.href); 384 var request = SDK.NetworkLog.requestForURL(anchor.href);
387 if (request) { 385 if (request) {
388 Common.Revealer.reveal(request); 386 Common.Revealer.reveal(request);
389 return; 387 return;
390 } 388 }
391 InspectorFrontendHost.openInNewTab(anchor.href); 389 InspectorFrontendHost.openInNewTab(anchor.href);
392 } 390 }
393 391
394 if (!anchor.classList.contains('webkit-html-external-link')) 392 followLink();
395 followLink();
396 else
397 InspectorFrontendHost.openInNewTab(anchor.href);
398 } 393 }
399 394
400 _registerShortcuts() { 395 _registerShortcuts() {
401 var shortcut = UI.KeyboardShortcut; 396 var shortcut = UI.KeyboardShortcut;
402 var section = Components.shortcutsScreen.section(Common.UIString('All Panels ')); 397 var section = Components.shortcutsScreen.section(Common.UIString('All Panels '));
403 var keys = [ 398 var keys = [
404 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta), 399 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta),
405 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta) 400 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta)
406 ]; 401 ];
407 section.addRelatedKeys(keys, Common.UIString('Go to the panel to the left/ri ght')); 402 section.addRelatedKeys(keys, Common.UIString('Go to the panel to the left/ri ght'));
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 * @override 1049 * @override
1055 * @return {?Element} 1050 * @return {?Element}
1056 */ 1051 */
1057 settingElement() { 1052 settingElement() {
1058 return UI.SettingsUI.createSettingCheckbox( 1053 return UI.SettingsUI.createSettingCheckbox(
1059 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 1054 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
1060 } 1055 }
1061 }; 1056 };
1062 1057
1063 new Main.Main(); 1058 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698