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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.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) 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (this._uiSourceCode.project().canSetFileContent()) 157 if (this._uiSourceCode.project().canSetFileContent())
158 return true; 158 return true;
159 if (this._uiSourceCode.isFromServiceProject()) 159 if (this._uiSourceCode.project().isServiceProject())
160 return false; 160 return false;
161 return this._uiSourceCode.contentType() !== Common.resourceTypes.Document; 161 return this._uiSourceCode.contentType() !== Common.resourceTypes.Document;
162 } 162 }
163 163
164 _windowFocused(event) { 164 _windowFocused(event) {
165 this._checkContentUpdated(); 165 this._checkContentUpdated();
166 } 166 }
167 167
168 _checkContentUpdated() { 168 _checkContentUpdated() {
169 if (!this.loaded || !this.isShowing()) 169 if (!this.loaded || !this.isShowing())
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 686
687 /** 687 /**
688 * @param {!Workspace.UISourceCode.Message} a 688 * @param {!Workspace.UISourceCode.Message} a
689 * @param {!Workspace.UISourceCode.Message} b 689 * @param {!Workspace.UISourceCode.Message} b
690 * @return {number} 690 * @return {number}
691 */ 691 */
692 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { 692 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) {
693 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - 693 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] -
694 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; 694 Workspace.UISourceCode.Message._messageLevelPriority[b.level()];
695 }; 695 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698