{
if (contentProvider instanceof WebInspector.UISourceCode) {
var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (contentProvider);
- uiSourceCode.saveToFileSystem(forceSaveAs);
+ uiSourceCode.save(forceSaveAs);
return;
}
contentProvider.requestContent(doSave.bind(null, forceSaveAs));
contextMenu.appendSeparator();
contextMenu.appendItem(WebInspector.UIString("Save"), save.bind(null, false));
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Save as..." : "Save As..."), save.bind(null, true));
+
+ if (contentProvider instanceof WebInspector.UISourceCode) {
+ var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (contentProvider);
+ if (uiSourceCode.project().type() !== WebInspector.projectTypes.FileSystem && uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets)
+ contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Save as..." : "Save As..."), save.bind(null, true));
+ }
},
/**
WebInspector.HandlerSelector = function(handlerRegistry)
{
this._handlerRegistry = handlerRegistry;
- this.element = document.createElement("select");
+ this.element = document.createElementWithClass("select", "chrome-select");
this.element.addEventListener("change", this._onChange.bind(this), false);
this._update();
this._handlerRegistry.addEventListener(WebInspector.HandlerRegistry.EventTypes.HandlersUpdated, this._update.bind(this));