Index: content/browser/resources/media/tab_view.js |
diff --git a/content/browser/resources/media/tab_view.js b/content/browser/resources/media/tab_view.js |
index 84897f5fb3809bc4f6fc976753952708e6b2bc1c..ca205091c18eec77f33ee8794bad0a28655b658d 100644 |
--- a/content/browser/resources/media/tab_view.js |
+++ b/content/browser/resources/media/tab_view.js |
@@ -85,6 +85,17 @@ var TabView = (function() { |
} |
}, |
+ makeTabRemovable: function(id) { |
+ if (!this.tabElements_[id]) |
+ return; |
+ var close = document.createElement('a'); |
+ close.textContent = '[x]'; |
+ close.addEventListener('click', function() { |
+ this.removeTab(id); |
+ }.bind(this)); |
+ this.tabElements_[id].head.appendChild(close); |
+ }, |
+ |
/** |
* Switches the specified tab into view. |
* |