OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" |
6 | 6 |
7 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 7 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
8 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" | 8 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return NULL; | 214 return NULL; |
215 } | 215 } |
216 | 216 |
217 // We only get here during teardown if we have one last buffer pending, | 217 // We only get here during teardown if we have one last buffer pending, |
218 // otherwise the ACK is handled by the guest. | 218 // otherwise the ACK is handled by the guest. |
219 void BrowserPluginGuestManager::OnUnhandledSwapBuffersACK( | 219 void BrowserPluginGuestManager::OnUnhandledSwapBuffersACK( |
220 int instance_id, | 220 int instance_id, |
221 const FrameHostMsg_BuffersSwappedACK_Params& params) { | 221 const FrameHostMsg_BuffersSwappedACK_Params& params) { |
222 BrowserPluginGuest::AcknowledgeBufferPresent(params.gpu_route_id, | 222 BrowserPluginGuest::AcknowledgeBufferPresent(params.gpu_route_id, |
223 params.gpu_host_id, | 223 params.gpu_host_id, |
224 params.mailbox_name, | 224 params.mailbox, |
225 params.sync_point); | 225 params.sync_point); |
226 } | 226 } |
227 | 227 |
228 bool BrowserPluginGuestManager::ForEachGuest( | 228 bool BrowserPluginGuestManager::ForEachGuest( |
229 WebContentsImpl* embedder_web_contents, const GuestCallback& callback) { | 229 WebContentsImpl* embedder_web_contents, const GuestCallback& callback) { |
230 for (GuestInstanceMap::iterator it = | 230 for (GuestInstanceMap::iterator it = |
231 guest_web_contents_by_instance_id_.begin(); | 231 guest_web_contents_by_instance_id_.begin(); |
232 it != guest_web_contents_by_instance_id_.end(); ++it) { | 232 it != guest_web_contents_by_instance_id_.end(); ++it) { |
233 BrowserPluginGuest* guest = it->second->GetBrowserPluginGuest(); | 233 BrowserPluginGuest* guest = it->second->GetBrowserPluginGuest(); |
234 if (embedder_web_contents != guest->embedder_web_contents()) | 234 if (embedder_web_contents != guest->embedder_web_contents()) |
235 continue; | 235 continue; |
236 | 236 |
237 if (callback.Run(guest)) | 237 if (callback.Run(guest)) |
238 return true; | 238 return true; |
239 } | 239 } |
240 return false; | 240 return false; |
241 } | 241 } |
242 | 242 |
243 } // namespace content | 243 } // namespace content |
OLD | NEW |