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

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

Issue 2546473005: [DevTools] Remove unnecessary checks for project types. (Closed)
Patch Set: fixed comment 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
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 * 10 *
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 delete this._boundWindowFocused; 147 delete this._boundWindowFocused;
148 this._uiSourceCode.removeWorkingCopyGetter(); 148 this._uiSourceCode.removeWorkingCopyGetter();
149 } 149 }
150 150
151 /** 151 /**
152 * @return {boolean} 152 * @return {boolean}
153 */ 153 */
154 _canEditSource() { 154 _canEditSource() {
155 if (Persistence.persistence.binding(this._uiSourceCode)) 155 if (Persistence.persistence.binding(this._uiSourceCode))
156 return true; 156 return true;
157 var projectType = this._uiSourceCode.project().type(); 157 if (this._uiSourceCode.project().canSetFileContent())
158 if (projectType === Workspace.projectTypes.Service || projectType === Worksp ace.projectTypes.Debugger || 158 return true;
159 projectType === Workspace.projectTypes.Formatter) 159 if (this._uiSourceCode.isFromServiceProject())
160 return false; 160 return false;
161 if (projectType === Workspace.projectTypes.Network && 161 return this._uiSourceCode.contentType() !== Common.resourceTypes.Document;
162 this._uiSourceCode.contentType() === Common.resourceTypes.Document)
163 return false;
164 return true;
165 } 162 }
166 163
167 _windowFocused(event) { 164 _windowFocused(event) {
168 this._checkContentUpdated(); 165 this._checkContentUpdated();
169 } 166 }
170 167
171 _checkContentUpdated() { 168 _checkContentUpdated() {
172 if (!this.loaded || !this.isShowing()) 169 if (!this.loaded || !this.isShowing())
173 return; 170 return;
174 this._uiSourceCode.checkContentUpdated(true); 171 this._uiSourceCode.checkContentUpdated(true);
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 686
690 /** 687 /**
691 * @param {!Workspace.UISourceCode.Message} a 688 * @param {!Workspace.UISourceCode.Message} a
692 * @param {!Workspace.UISourceCode.Message} b 689 * @param {!Workspace.UISourceCode.Message} b
693 * @return {number} 690 * @return {number}
694 */ 691 */
695 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { 692 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) {
696 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - 693 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] -
697 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; 694 Workspace.UISourceCode.Message._messageLevelPriority[b.level()];
698 }; 695 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698