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

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: rebased 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 384 }
385 385
386 var request = SDK.NetworkLog.requestForURL(anchor.href); 386 var request = SDK.NetworkLog.requestForURL(anchor.href);
387 if (request) { 387 if (request) {
388 Common.Revealer.reveal(request); 388 Common.Revealer.reveal(request);
389 return; 389 return;
390 } 390 }
391 InspectorFrontendHost.openInNewTab(anchor.href); 391 InspectorFrontendHost.openInNewTab(anchor.href);
392 } 392 }
393 393
394 if (!anchor.classList.contains('webkit-html-external-link')) 394 followLink();
395 followLink();
396 else
397 InspectorFrontendHost.openInNewTab(anchor.href);
398 } 395 }
399 396
400 _registerShortcuts() { 397 _registerShortcuts() {
401 var shortcut = UI.KeyboardShortcut; 398 var shortcut = UI.KeyboardShortcut;
402 var section = Components.shortcutsScreen.section(Common.UIString('All Panels ')); 399 var section = Components.shortcutsScreen.section(Common.UIString('All Panels '));
403 var keys = [ 400 var keys = [
404 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta), 401 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta),
405 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta) 402 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta)
406 ]; 403 ];
407 section.addRelatedKeys(keys, Common.UIString('Go to the panel to the left/ri ght')); 404 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 1051 * @override
1055 * @return {?Element} 1052 * @return {?Element}
1056 */ 1053 */
1057 settingElement() { 1054 settingElement() {
1058 return UI.SettingsUI.createSettingCheckbox( 1055 return UI.SettingsUI.createSettingCheckbox(
1059 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 1056 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
1060 } 1057 }
1061 }; 1058 };
1062 1059
1063 new Main.Main(); 1060 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698