Index: chrome/browser/extensions/extension_tab_util.cc |
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc |
index 5d4b89b667faac9facefd526cd0de2a974db0499..9dd5564d40eb7532a0e129b0e3b26330d509ec42 100644 |
--- a/chrome/browser/extensions/extension_tab_util.cc |
+++ b/chrome/browser/extensions/extension_tab_util.cc |
@@ -350,10 +350,13 @@ base::ListValue* ExtensionTabUtil::CreateTabList( |
base::ListValue* tab_list = new base::ListValue(); |
TabStripModel* tab_strip = browser->tab_strip_model(); |
for (int i = 0; i < tab_strip->count(); ++i) { |
- tab_list->Append(CreateTabValue(tab_strip->GetWebContentsAt(i), |
- tab_strip, |
- i, |
- extension)); |
+ base::DictionaryValue* value = |
+ CreateTabValue(tab_strip->GetWebContentsAt(i), tab_strip, i, extension); |
+ // Remove tab id for devtools as we don't want them to be |
+ // manipulated through the chrome.tabs API. |
+ if (browser->is_devtools()) |
dgozman
2015/07/14 15:16:16
What about TabUpdatedEvent or TabsGetCurrent? Perh
not at google - send to devlin
2015/07/14 17:15:13
CreateTabValue looks right to me.
not at google - send to devlin
2015/07/14 17:40:00
Actually, GetTabID looks even right-er to me. More
not at google - send to devlin
2015/07/14 17:41:09
More comments:
In fact I wonder if this would bre
|
+ value->Remove(keys::kIdKey, nullptr); |
+ tab_list->Append(value); |
} |
return tab_list; |