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

Side by Side Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 316153002: DevTools: Polish uiSourceCode context menu on sources panel. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 * @param {?Event} event 883 * @param {?Event} event
884 * @param {!WebInspector.ContextMenu} contextMenu 884 * @param {!WebInspector.ContextMenu} contextMenu
885 * @param {!Object} target 885 * @param {!Object} target
886 */ 886 */
887 _appendUISourceCodeItems: function(event, contextMenu, target) 887 _appendUISourceCodeItems: function(event, contextMenu, target)
888 { 888 {
889 if (!(target instanceof WebInspector.UISourceCode)) 889 if (!(target instanceof WebInspector.UISourceCode))
890 return; 890 return;
891 891
892 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (target); 892 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (target);
893 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe nuTitles() ? "Local modifications\u2026" : "Local Modifications\u2026"), this._s howLocalHistory.bind(this, uiSourceCode)); 893 var project = uiSourceCode.project();
894 if (project.type() !== WebInspector.projectTypes.FileSystem)
895 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa seMenuTitles() ? "Local modifications\u2026" : "Local Modifications\u2026"), thi s._showLocalHistory.bind(this, uiSourceCode));
894 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode); 896 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode);
895 897
896 if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement())) { 898 if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement())) {
897 contextMenu.appendSeparator(); 899 contextMenu.appendSeparator();
898 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa seMenuTitles() ? "Reveal in navigator" : "Reveal in Navigator"), this._handleCon textMenuReveal.bind(this, uiSourceCode)); 900 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa seMenuTitles() ? "Reveal in navigator" : "Reveal in Navigator"), this._handleCon textMenuReveal.bind(this, uiSourceCode));
899 } 901 }
900 }, 902 },
901 903
902 /** 904 /**
903 * @param {!WebInspector.UISourceCode} uiSourceCode 905 * @param {!WebInspector.UISourceCode} uiSourceCode
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = { 1411 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = {
1410 /** 1412 /**
1411 * @return {boolean} 1413 * @return {boolean}
1412 */ 1414 */
1413 handleAction: function() 1415 handleAction: function()
1414 { 1416 {
1415 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).togglePause(); 1417 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).togglePause();
1416 return true; 1418 return true;
1417 } 1419 }
1418 } 1420 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698