Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_guest_manager.cc |
| diff --git a/content/browser/browser_plugin/browser_plugin_guest_manager.cc b/content/browser/browser_plugin/browser_plugin_guest_manager.cc |
| index 8fb51b664a83b1bb6bb5bbec053a8bf9d05efff5..13626f0dcb10923a3e41c5ecc406cb1902f34e04 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest_manager.cc |
| +++ b/content/browser/browser_plugin/browser_plugin_guest_manager.cc |
| @@ -224,6 +224,19 @@ void BrowserPluginGuestManager::OnUnhandledSwapBuffersACK( |
| params.sync_point); |
| } |
| +void BrowserPluginGuestManager::GetGuests( |
| + WebContentsImpl* embedder_web_contents, |
| + base::Callback<void(BrowserPluginGuest*)> callback) { |
| + for (GuestInstanceMap::iterator it = |
| + guest_web_contents_by_instance_id_.begin(); |
| + it != guest_web_contents_by_instance_id_.end(); ++it) { |
|
nasko
2014/01/06 21:58:40
nit: indent should match GuestInstanceMap.
Fady Samuel
2014/01/08 19:42:43
Done.
|
| + BrowserPluginGuest* guest = it->second->GetBrowserPluginGuest(); |
| + if (embedder_web_contents != guest->embedder_web_contents()) |
| + continue; |
| + callback.Run(guest); |
| + } |
| +} |
| + |
| void BrowserPluginGuestManager::DidSendScreenRects( |
| WebContentsImpl* embedder_web_contents) { |
| // TODO(lazyboy): Generalize iterating over guest instances and performing |