refactor: remove guestInstanceId from WebPreferences (#30280)

* refactor: remove guestInstanceId from WebPreferences

* refactor: remove WebViewManager::GetEmbedder
This commit is contained in:
Milan Burda 2021-07-29 00:32:53 +02:00 committed by GitHub
parent c3abbdefdd
commit c5ad7ed0cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 53 additions and 71 deletions

View file

@ -23,12 +23,6 @@ void WebViewManager::RemoveGuest(int guest_instance_id) {
web_contents_embedder_map_.erase(guest_instance_id);
}
content::WebContents* WebViewManager::GetEmbedder(int guest_instance_id) {
const auto iter = web_contents_embedder_map_.find(guest_instance_id);
return iter == std::end(web_contents_embedder_map_) ? nullptr
: iter->second.embedder;
}
bool WebViewManager::ForEachGuest(content::WebContents* embedder_web_contents,
const GuestCallback& callback) {
for (auto& item : web_contents_embedder_map_) {