Commit 3c1769f9 authored by fserb's avatar fserb Committed by Commit bot

Revert of webrtc-internals: dont remove tab (patchset #1 id:1 of...

Revert of webrtc-internals: dont remove tab (patchset #1 id:1 of https://codereview.chromium.org/2739443002/ )

Reason for revert:
This is breaking some Mac builds
https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/14781

Original issue's description:
> webrtc-internals: dont remove tab
>
> instead of removing the tab when a peerconnection is garbage collected
> this adds a symbol which removes the tab on click.
>
> BUG=416876
>
> Review-Url: https://codereview.chromium.org/2739443002
> Cr-Commit-Position: refs/heads/master@{#455743}
> Committed: https://chromium.googlesource.com/chromium/src/+/b31e6f5fc2cae4ce8efdb57eb995a0c2e583dd75

TBR=guidou@chromium.org,tommi@chromium.org,philipp.hancke@googlemail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=416876

Review-Url: https://codereview.chromium.org/2745433004
Cr-Commit-Position: refs/heads/master@{#455760}
parent 3c1d10ca
...@@ -85,17 +85,6 @@ var TabView = (function() { ...@@ -85,17 +85,6 @@ 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. * Switches the specified tab into view.
* *
......
...@@ -181,8 +181,7 @@ function removePeerConnection(data) { ...@@ -181,8 +181,7 @@ function removePeerConnection(data) {
var element = $(getPeerConnectionId(data)); var element = $(getPeerConnectionId(data));
if (element) { if (element) {
delete peerConnectionDataStore[element.id]; delete peerConnectionDataStore[element.id];
// add a [x] button to close this tab instead of removing it immediately. tabView.removeTab(element.id);
tabView.makeTabRemovable(element.id);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment