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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js

Issue 2515763003: DevTools: use shorthand syntax in interface definitions. (Closed)
Patch Set: Created 4 years, 1 month 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/workspace/UISourceCode.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 * * 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 18 matching lines...) Expand all
29 */ 29 */
30 /** 30 /**
31 * @interface 31 * @interface
32 */ 32 */
33 Workspace.ProjectSearchConfig = function() {}; 33 Workspace.ProjectSearchConfig = function() {};
34 34
35 Workspace.ProjectSearchConfig.prototype = { 35 Workspace.ProjectSearchConfig.prototype = {
36 /** 36 /**
37 * @return {string} 37 * @return {string}
38 */ 38 */
39 query: function() {}, 39 query() {},
40 40
41 /** 41 /**
42 * @return {boolean} 42 * @return {boolean}
43 */ 43 */
44 ignoreCase: function() {}, 44 ignoreCase() {},
45 45
46 /** 46 /**
47 * @return {boolean} 47 * @return {boolean}
48 */ 48 */
49 isRegex: function() {}, 49 isRegex() {},
50 50
51 /** 51 /**
52 * @return {!Array.<string>} 52 * @return {!Array.<string>}
53 */ 53 */
54 queries: function() {}, 54 queries() {},
55 55
56 /** 56 /**
57 * @param {string} filePath 57 * @param {string} filePath
58 * @return {boolean} 58 * @return {boolean}
59 */ 59 */
60 filePathMatchesFileQuery: function(filePath) {} 60 filePathMatchesFileQuery(filePath) {}
61 }; 61 };
62 62
63 /** 63 /**
64 * @interface 64 * @interface
65 */ 65 */
66 Workspace.Project = function() {}; 66 Workspace.Project = function() {};
67 67
68 /** 68 /**
69 * @param {!Workspace.Project} project 69 * @param {!Workspace.Project} project
70 * @return {boolean} 70 * @return {boolean}
71 */ 71 */
72 Workspace.Project.isServiceProject = function(project) { 72 Workspace.Project.isServiceProject = function(project) {
73 return project.type() === Workspace.projectTypes.Debugger || project.type() == = Workspace.projectTypes.Formatter || 73 return project.type() === Workspace.projectTypes.Debugger || project.type() == = Workspace.projectTypes.Formatter ||
74 project.type() === Workspace.projectTypes.Service; 74 project.type() === Workspace.projectTypes.Service;
75 }; 75 };
76 76
77 Workspace.Project.prototype = { 77 Workspace.Project.prototype = {
78 /** 78 /**
79 * @return {!Workspace.Workspace} 79 * @return {!Workspace.Workspace}
80 */ 80 */
81 workspace: function() {}, 81 workspace() {},
82 82
83 /** 83 /**
84 * @return {string} 84 * @return {string}
85 */ 85 */
86 id: function() {}, 86 id() {},
87 87
88 /** 88 /**
89 * @return {string} 89 * @return {string}
90 */ 90 */
91 type: function() {}, 91 type() {},
92 92
93 /** 93 /**
94 * @return {string} 94 * @return {string}
95 */ 95 */
96 displayName: function() {}, 96 displayName() {},
97 97
98 /** 98 /**
99 * @param {!Workspace.UISourceCode} uiSourceCode 99 * @param {!Workspace.UISourceCode} uiSourceCode
100 * @return {!Promise<?Workspace.UISourceCodeMetadata>} 100 * @return {!Promise<?Workspace.UISourceCodeMetadata>}
101 */ 101 */
102 requestMetadata: function(uiSourceCode) {}, 102 requestMetadata(uiSourceCode) {},
103 103
104 /** 104 /**
105 * @param {!Workspace.UISourceCode} uiSourceCode 105 * @param {!Workspace.UISourceCode} uiSourceCode
106 * @param {function(?string)} callback 106 * @param {function(?string)} callback
107 */ 107 */
108 requestFileContent: function(uiSourceCode, callback) {}, 108 requestFileContent(uiSourceCode, callback) {},
109 109
110 /** 110 /**
111 * @return {boolean} 111 * @return {boolean}
112 */ 112 */
113 canSetFileContent: function() {}, 113 canSetFileContent() {},
114 114
115 /** 115 /**
116 * @param {!Workspace.UISourceCode} uiSourceCode 116 * @param {!Workspace.UISourceCode} uiSourceCode
117 * @param {string} newContent 117 * @param {string} newContent
118 * @param {function(?string)} callback 118 * @param {function(?string)} callback
119 */ 119 */
120 setFileContent: function(uiSourceCode, newContent, callback) {}, 120 setFileContent(uiSourceCode, newContent, callback) {},
121 121
122 /** 122 /**
123 * @return {boolean} 123 * @return {boolean}
124 */ 124 */
125 canRename: function() {}, 125 canRename() {},
126 126
127 /** 127 /**
128 * @param {!Workspace.UISourceCode} uiSourceCode 128 * @param {!Workspace.UISourceCode} uiSourceCode
129 * @param {string} newName 129 * @param {string} newName
130 * @param {function(boolean, string=, string=, !Common.ResourceType=)} callbac k 130 * @param {function(boolean, string=, string=, !Common.ResourceType=)} callbac k
131 */ 131 */
132 rename: function(uiSourceCode, newName, callback) {}, 132 rename(uiSourceCode, newName, callback) {},
133 133
134 /** 134 /**
135 * @param {string} path 135 * @param {string} path
136 */ 136 */
137 excludeFolder: function(path) {}, 137 excludeFolder(path) {},
138 138
139 /** 139 /**
140 * @param {string} path 140 * @param {string} path
141 * @param {?string} name 141 * @param {?string} name
142 * @param {string} content 142 * @param {string} content
143 * @param {function(?Workspace.UISourceCode)} callback 143 * @param {function(?Workspace.UISourceCode)} callback
144 */ 144 */
145 createFile: function(path, name, content, callback) {}, 145 createFile(path, name, content, callback) {},
146 146
147 /** 147 /**
148 * @param {string} path 148 * @param {string} path
149 */ 149 */
150 deleteFile: function(path) {}, 150 deleteFile(path) {},
151 151
152 remove: function() {}, 152 remove() {},
153 153
154 /** 154 /**
155 * @param {!Workspace.UISourceCode} uiSourceCode 155 * @param {!Workspace.UISourceCode} uiSourceCode
156 * @param {string} query 156 * @param {string} query
157 * @param {boolean} caseSensitive 157 * @param {boolean} caseSensitive
158 * @param {boolean} isRegex 158 * @param {boolean} isRegex
159 * @param {function(!Array.<!Common.ContentProvider.SearchMatch>)} callback 159 * @param {function(!Array.<!Common.ContentProvider.SearchMatch>)} callback
160 */ 160 */
161 searchInFileContent: function(uiSourceCode, query, caseSensitive, isRegex, cal lback) {}, 161 searchInFileContent(uiSourceCode, query, caseSensitive, isRegex, callback) {},
162 162
163 /** 163 /**
164 * @param {!Workspace.ProjectSearchConfig} searchConfig 164 * @param {!Workspace.ProjectSearchConfig} searchConfig
165 * @param {!Array.<string>} filesMathingFileQuery 165 * @param {!Array.<string>} filesMathingFileQuery
166 * @param {!Common.Progress} progress 166 * @param {!Common.Progress} progress
167 * @param {function(!Array.<string>)} callback 167 * @param {function(!Array.<string>)} callback
168 */ 168 */
169 findFilesMatchingSearchRequest: function(searchConfig, filesMathingFileQuery, progress, callback) {}, 169 findFilesMatchingSearchRequest(searchConfig, filesMathingFileQuery, progress, callback) {},
170 170
171 /** 171 /**
172 * @param {!Common.Progress} progress 172 * @param {!Common.Progress} progress
173 */ 173 */
174 indexContent: function(progress) {}, 174 indexContent(progress) {},
175 175
176 /** 176 /**
177 * @param {string} url 177 * @param {string} url
178 * @return {?Workspace.UISourceCode} 178 * @return {?Workspace.UISourceCode}
179 */ 179 */
180 uiSourceCodeForURL: function(url) {}, 180 uiSourceCodeForURL(url) {},
181 181
182 /** 182 /**
183 * @return {!Array.<!Workspace.UISourceCode>} 183 * @return {!Array.<!Workspace.UISourceCode>}
184 */ 184 */
185 uiSourceCodes: function() {} 185 uiSourceCodes() {}
186 }; 186 };
187 187
188 /** 188 /**
189 * @enum {string} 189 * @enum {string}
190 */ 190 */
191 Workspace.projectTypes = { 191 Workspace.projectTypes = {
192 Debugger: 'debugger', 192 Debugger: 'debugger',
193 Formatter: 'formatter', 193 Formatter: 'formatter',
194 Network: 'network', 194 Network: 'network',
195 Snippets: 'snippets', 195 Snippets: 'snippets',
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 WorkingCopyCommitted: Symbol('WorkingCopyCommitted'), 455 WorkingCopyCommitted: Symbol('WorkingCopyCommitted'),
456 WorkingCopyCommittedByUser: Symbol('WorkingCopyCommittedByUser'), 456 WorkingCopyCommittedByUser: Symbol('WorkingCopyCommittedByUser'),
457 ProjectAdded: Symbol('ProjectAdded'), 457 ProjectAdded: Symbol('ProjectAdded'),
458 ProjectRemoved: Symbol('ProjectRemoved') 458 ProjectRemoved: Symbol('ProjectRemoved')
459 }; 459 };
460 460
461 /** 461 /**
462 * @type {!Workspace.Workspace} 462 * @type {!Workspace.Workspace}
463 */ 463 */
464 Workspace.workspace; 464 Workspace.workspace;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698