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

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

Issue 2537223003: [DevTools] Introduce Project.isServiceProject method. (Closed)
Patch Set: rebased Created 4 years 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) 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 /** 824 /**
825 * @param {!Event} event 825 * @param {!Event} event
826 * @param {!UI.ContextMenu} contextMenu 826 * @param {!UI.ContextMenu} contextMenu
827 * @param {!Object} target 827 * @param {!Object} target
828 */ 828 */
829 _appendUISourceCodeItems(event, contextMenu, target) { 829 _appendUISourceCodeItems(event, contextMenu, target) {
830 if (!(target instanceof Workspace.UISourceCode)) 830 if (!(target instanceof Workspace.UISourceCode))
831 return; 831 return;
832 832
833 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (target); 833 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (target);
834 if (!uiSourceCode.isFromServiceProject() && 834 if (!uiSourceCode.project().isServiceProject() &&
835 !event.target.isSelfOrDescendant(this._navigatorTabbedLocation.widget(). element)) { 835 !event.target.isSelfOrDescendant(this._navigatorTabbedLocation.widget(). element)) {
836 contextMenu.appendItem( 836 contextMenu.appendItem(
837 Common.UIString.capitalize('Reveal in ^navigator'), this._handleContex tMenuReveal.bind(this, uiSourceCode)); 837 Common.UIString.capitalize('Reveal in ^navigator'), this._handleContex tMenuReveal.bind(this, uiSourceCode));
838 contextMenu.appendSeparator(); 838 contextMenu.appendSeparator();
839 } 839 }
840 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode); 840 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode);
841 if (!uiSourceCode.project().canSetFileContent()) { 841 if (!uiSourceCode.project().canSetFileContent()) {
842 contextMenu.appendItem( 842 contextMenu.appendItem(
843 Common.UIString.capitalize('Local ^modifications\u2026'), this._showLo calHistory.bind(this, uiSourceCode)); 843 Common.UIString.capitalize('Local ^modifications\u2026'), this._showLo calHistory.bind(this, uiSourceCode));
844 } 844 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 */ 1318 */
1319 willHide() { 1319 willHide() {
1320 UI.inspectorView.setDrawerMinimized(false); 1320 UI.inspectorView.setDrawerMinimized(false);
1321 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance())); 1321 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance()));
1322 } 1322 }
1323 1323
1324 _showViewInWrapper() { 1324 _showViewInWrapper() {
1325 this._view.show(this.element); 1325 this._view.show(this.element);
1326 } 1326 }
1327 }; 1327 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698