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

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js

Issue 2482073002: DevTools: introduce beautiful checkmarks in navigator and editor tabs (Closed)
Patch Set: rename icons 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
new file mode 100644
index 0000000000000000000000000000000000000000..62b9de0e24e7c9975399f2302f192c4a6be4a28f
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+WebInspector.PersistenceUtils = class {
+ /**
+ * @param {!WebInspector.UISourceCode} uiSourceCode
+ * @return {string}
+ */
+ static tooltipForUISourceCode(uiSourceCode) {
+ var binding = WebInspector.persistence.binding(uiSourceCode);
+ if (!binding)
+ return '';
+ if (uiSourceCode === binding.network)
+ return WebInspector.UIString('Persisted to file system: %s', binding.fileSystem.url().trimMiddle(150));
+ if (binding.network.contentType().isFromSourceMap())
+ return WebInspector.UIString('Linked to source map: %s', binding.network.url().trimMiddle(150));
+ return WebInspector.UIString('Linked to %s', binding.network.url().trimMiddle(150));
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698