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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 try { 128 try {
129 name = decodeURI(name); 129 name = decodeURI(name);
130 } catch (e) { 130 } catch (e) {
131 } 131 }
132 return skipTrim ? name : name.trimEnd(100); 132 return skipTrim ? name : name.trimEnd(100);
133 } 133 }
134 134
135 /** 135 /**
136 * @return {boolean} 136 * @return {boolean}
137 */ 137 */
138 isFromServiceProject() {
139 return Workspace.Project.isServiceProject(this._project);
140 }
141
142 /**
143 * @return {boolean}
144 */
145 canRename() { 138 canRename() {
146 return this._project.canRename(); 139 return this._project.canRename();
147 } 140 }
148 141
149 /** 142 /**
150 * @param {string} newName 143 * @param {string} newName
151 * @param {function(boolean)} callback 144 * @param {function(boolean)} callback
152 */ 145 */
153 rename(newName, callback) { 146 rename(newName, callback) {
154 this._project.rename(this, newName, innerCallback.bind(this)); 147 this._project.rename(this, newName, innerCallback.bind(this));
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 Workspace.UISourceCodeMetadata = class { 939 Workspace.UISourceCodeMetadata = class {
947 /** 940 /**
948 * @param {?Date} modificationTime 941 * @param {?Date} modificationTime
949 * @param {?number} contentSize 942 * @param {?number} contentSize
950 */ 943 */
951 constructor(modificationTime, contentSize) { 944 constructor(modificationTime, contentSize) {
952 this.modificationTime = modificationTime; 945 this.modificationTime = modificationTime;
953 this.contentSize = contentSize; 946 this.contentSize = contentSize;
954 } 947 }
955 }; 948 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698