Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / components / HandlerRegistry.js
index 5779c0a..5d9b1f2 100644 (file)
@@ -146,7 +146,7 @@ WebInspector.HandlerRegistry.prototype = {
         {
             if (contentProvider instanceof WebInspector.UISourceCode) {
                 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (contentProvider);
-                uiSourceCode.saveToFileSystem(forceSaveAs);
+                uiSourceCode.save(forceSaveAs);
                 return;
             }
             contentProvider.requestContent(doSave.bind(null, forceSaveAs));
@@ -154,7 +154,12 @@ WebInspector.HandlerRegistry.prototype = {
 
         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));
+        }
     },
 
     /**
@@ -205,7 +210,7 @@ WebInspector.HandlerRegistry.EventTypes = {
 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));