feat: add support for chrome.tabs.query
(#39330)
* feat: add support for tabs.query * fix: scope to webContents in current session * test: add test for session behavior
This commit is contained in:
parent
0425454687
commit
d9329042e2
9 changed files with 336 additions and 2 deletions
|
@ -4405,6 +4405,16 @@ WebContents* WebContents::FromID(int32_t id) {
|
|||
return GetAllWebContents().Lookup(id);
|
||||
}
|
||||
|
||||
// static
|
||||
std::list<WebContents*> WebContents::GetWebContentsList() {
|
||||
std::list<WebContents*> list;
|
||||
for (auto iter = base::IDMap<WebContents*>::iterator(&GetAllWebContents());
|
||||
!iter.IsAtEnd(); iter.Advance()) {
|
||||
list.push_back(iter.GetCurrentValue());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// static
|
||||
gin::WrapperInfo WebContents::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue