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

Side by Side Diff: Source/devtools/front_end/HandlerRegistry.js

Issue 18341003: DevTools: [CodeMirror] Add syntax highlighting for some other languages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 5 months 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 | Annotate | Revision Log
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 if (!contentProvider.contentURL()) 127 if (!contentProvider.contentURL())
128 return; 128 return;
129 129
130 var contentType = contentProvider.contentType(); 130 var contentType = contentProvider.contentType();
131 if (contentType !== WebInspector.resourceTypes.Document && 131 if (contentType !== WebInspector.resourceTypes.Document &&
132 contentType !== WebInspector.resourceTypes.Stylesheet && 132 contentType !== WebInspector.resourceTypes.Stylesheet &&
133 contentType !== WebInspector.resourceTypes.Script) 133 contentType !== WebInspector.resourceTypes.Script)
134 return; 134 return;
135 135
136 /**
137 * @param {boolean} forceSaveAs
138 * @param {?string} content
139 */
136 function doSave(forceSaveAs, content) 140 function doSave(forceSaveAs, content)
137 { 141 {
138 var url = contentProvider.contentURL(); 142 var url = contentProvider.contentURL();
139 WebInspector.fileManager.save(url, content, forceSaveAs); 143 WebInspector.fileManager.save(url, content, forceSaveAs);
140 WebInspector.fileManager.close(url); 144 WebInspector.fileManager.close(url);
141 } 145 }
142 146
147 /**
148 * @param {boolean} forceSaveAs
149 */
143 function save(forceSaveAs) 150 function save(forceSaveAs)
144 { 151 {
145 if (contentProvider instanceof WebInspector.UISourceCode) { 152 if (contentProvider instanceof WebInspector.UISourceCode) {
146 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (con tentProvider); 153 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (con tentProvider);
147 uiSourceCode.saveToFileSystem(forceSaveAs); 154 uiSourceCode.saveToFileSystem(forceSaveAs);
148 return; 155 return;
149 } 156 }
150 contentProvider.requestContent(doSave.bind(this, forceSaveAs)); 157 contentProvider.requestContent(doSave.bind(this, forceSaveAs));
151 } 158 }
152 159
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 var value = event.target.value; 229 var value = event.target.value;
223 this._handlerRegistry.activeHandler = value; 230 this._handlerRegistry.activeHandler = value;
224 } 231 }
225 } 232 }
226 233
227 234
228 /** 235 /**
229 * @type {WebInspector.HandlerRegistry} 236 * @type {WebInspector.HandlerRegistry}
230 */ 237 */
231 WebInspector.openAnchorLocationRegistry = null; 238 WebInspector.openAnchorLocationRegistry = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698