summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_plugin
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/browser_plugin')
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc32
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.h15
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest_manager.cc13
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest_manager.h9
4 files changed, 29 insertions, 40 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 0e6ba06..716c2b7 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -507,8 +507,8 @@ bool BrowserPluginGuest::OnMessageReceivedFromEmbedder(
IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuest, message)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_BuffersSwappedACK,
OnSwapBuffersACK)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CompositorFrameACK,
- OnCompositorFrameACK)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CompositorFrameSwappedACK,
+ OnCompositorFrameSwappedACK)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CopyFromCompositingSurfaceAck,
OnCopyFromCompositingSurfaceAck)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate,
@@ -1142,7 +1142,7 @@ bool BrowserPluginGuest::ShouldForwardToBrowserPluginGuest(
const IPC::Message& message) {
switch (message.type()) {
case BrowserPluginHostMsg_BuffersSwappedACK::ID:
- case BrowserPluginHostMsg_CompositorFrameACK::ID:
+ case BrowserPluginHostMsg_CompositorFrameSwappedACK::ID:
case BrowserPluginHostMsg_CopyFromCompositingSurfaceAck::ID:
case BrowserPluginHostMsg_DragStatusUpdate::ID:
case BrowserPluginHostMsg_ExecuteEditCommand::ID:
@@ -1256,16 +1256,13 @@ void BrowserPluginGuest::Attach(
RecordAction(UserMetricsAction("BrowserPlugin.Guest.Attached"));
}
-void BrowserPluginGuest::OnCompositorFrameACK(
+void BrowserPluginGuest::OnCompositorFrameSwappedACK(
int instance_id,
- int route_id,
- uint32 output_surface_id,
- int renderer_host_id,
- const cc::CompositorFrameAck& ack) {
- RenderWidgetHostImpl::SendSwapCompositorFrameAck(route_id,
- output_surface_id,
- renderer_host_id,
- ack);
+ const FrameHostMsg_CompositorFrameSwappedACK_Params& params) {
+ RenderWidgetHostImpl::SendSwapCompositorFrameAck(params.producing_route_id,
+ params.output_surface_id,
+ params.producing_host_id,
+ params.ack);
}
void BrowserPluginGuest::OnDragStatusUpdate(int instance_id,
@@ -1575,12 +1572,11 @@ void BrowserPluginGuest::OnSetVisibility(int instance_id, bool visible) {
GetWebContents()->WasHidden();
}
-void BrowserPluginGuest::OnSwapBuffersACK(int instance_id,
- int route_id,
- int gpu_host_id,
- const std::string& mailbox_name,
- uint32 sync_point) {
- AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point);
+void BrowserPluginGuest::OnSwapBuffersACK(
+ int instance_id,
+ const FrameHostMsg_BuffersSwappedACK_Params& params) {
+ AcknowledgeBufferPresent(params.gpu_route_id, params.gpu_host_id,
+ params.mailbox_name, params.sync_point);
// This is only relevant on MACOSX and WIN when threaded compositing
// is not enabled. In threaded mode, above ACK is sufficient.
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 46c95a4..84675b5 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -45,6 +45,8 @@
struct BrowserPluginHostMsg_AutoSize_Params;
struct BrowserPluginHostMsg_Attach_Params;
struct BrowserPluginHostMsg_ResizeGuest_Params;
+struct FrameHostMsg_BuffersSwappedACK_Params;
+struct FrameHostMsg_CompositorFrameSwappedACK_Params;
struct ViewHostMsg_CreateWindow_Params;
#if defined(OS_MACOSX)
struct ViewHostMsg_ShowPopup_Params;
@@ -382,11 +384,9 @@ class CONTENT_EXPORT BrowserPluginGuest
// Message handlers for messages from embedder.
- void OnCompositorFrameACK(int instance_id,
- int route_id,
- uint32 output_surface_id,
- int renderer_host_id,
- const cc::CompositorFrameAck& ack);
+ void OnCompositorFrameSwappedACK(
+ int instance_id,
+ const FrameHostMsg_CompositorFrameSwappedACK_Params& params);
void OnCopyFromCompositingSurfaceAck(int instance_id,
int request_id,
const SkBitmap& bitmap);
@@ -457,10 +457,7 @@ class CONTENT_EXPORT BrowserPluginGuest
void OnSetVisibility(int instance_id, bool visible);
// Message from embedder acknowledging last HW buffer.
void OnSwapBuffersACK(int instance_id,
- int route_id,
- int gpu_host_id,
- const std::string& mailbox_name,
- uint32 sync_point);
+ const FrameHostMsg_BuffersSwappedACK_Params& params);
void OnUnlockMouse();
void OnUnlockMouseAck(int instance_id);
void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect);
diff --git a/content/browser/browser_plugin/browser_plugin_guest_manager.cc b/content/browser/browser_plugin/browser_plugin_guest_manager.cc
index d16d11a..8fb51b6 100644
--- a/content/browser/browser_plugin/browser_plugin_guest_manager.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest_manager.cc
@@ -217,14 +217,11 @@ SiteInstance* BrowserPluginGuestManager::GetGuestSiteInstance(
// otherwise the ACK is handled by the guest.
void BrowserPluginGuestManager::OnUnhandledSwapBuffersACK(
int instance_id,
- int route_id,
- int gpu_host_id,
- const std::string& mailbox_name,
- uint32 sync_point) {
- BrowserPluginGuest::AcknowledgeBufferPresent(route_id,
- gpu_host_id,
- mailbox_name,
- sync_point);
+ const FrameHostMsg_BuffersSwappedACK_Params& params) {
+ BrowserPluginGuest::AcknowledgeBufferPresent(params.gpu_route_id,
+ params.gpu_host_id,
+ params.mailbox_name,
+ params.sync_point);
}
void BrowserPluginGuestManager::DidSendScreenRects(
diff --git a/content/browser/browser_plugin/browser_plugin_guest_manager.h b/content/browser/browser_plugin/browser_plugin_guest_manager.h
index 1ce9a9f..f0bee02 100644
--- a/content/browser/browser_plugin/browser_plugin_guest_manager.h
+++ b/content/browser/browser_plugin/browser_plugin_guest_manager.h
@@ -17,6 +17,7 @@
struct BrowserPluginHostMsg_Attach_Params;
struct BrowserPluginHostMsg_ResizeGuest_Params;
+struct FrameHostMsg_BuffersSwappedACK_Params;
class GURL;
namespace gfx {
@@ -117,11 +118,9 @@ class CONTENT_EXPORT BrowserPluginGuestManager :
SiteInstance* GetGuestSiteInstance(const GURL& guest_site);
// Message handlers.
- void OnUnhandledSwapBuffersACK(int instance_id,
- int route_id,
- int gpu_host_id,
- const std::string& mailbox_name,
- uint32 sync_point);
+ void OnUnhandledSwapBuffersACK(
+ int instance_id,
+ const FrameHostMsg_BuffersSwappedACK_Params& params);
// Static factory instance (always NULL outside of tests).
static BrowserPluginHostFactory* factory_;