| Index: content/browser/browser_plugin/browser_plugin_host.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_host.cc b/content/browser/browser_plugin/browser_plugin_host.cc
|
| index 41f6f06600ef7ebaf2b2495244665573c5b08d5b..0e62b39d7ed2f6efb2f57ddf72ca60d70dd00d1a 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_host.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_host.cc
|
| @@ -36,7 +36,7 @@ BrowserPluginHost::BrowserPluginHost(
|
| // Construct plumbing helpers when a new RenderViewHost is created for
|
| // this BrowserPluginHost's WebContentsImpl.
|
| registrar_.Add(this,
|
| - NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
|
| + NOTIFICATION_WILL_CREATE_RENDER_VIEW,
|
| Source<WebContents>(web_contents));
|
| }
|
|
|
| @@ -75,7 +75,8 @@ void BrowserPluginHost::NavigateGuestFromEmbedder(
|
| RenderViewHost* render_view_host,
|
| int container_instance_id,
|
| long long frame_id,
|
| - const std::string& src) {
|
| + const std::string& src,
|
| + const BrowserPluginHostMsg_Surface_Params& params) {
|
| BrowserPluginHost* guest =
|
| GetGuestByContainerID(container_instance_id);
|
| WebContentsImpl* guest_web_contents =
|
| @@ -102,6 +103,7 @@ void BrowserPluginHost::NavigateGuestFromEmbedder(
|
| NULL // session storage namespace
|
| ));
|
| guest = guest_web_contents->browser_plugin_host();
|
| + guest->set_surface_params(params);
|
| guest->set_embedder_render_process_host(
|
| render_view_host->GetProcess());
|
| guest->set_instance_id(container_instance_id);
|
| @@ -224,6 +226,13 @@ void BrowserPluginHost::SetFocus(bool focused) {
|
| new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused));
|
| }
|
|
|
| +void BrowserPluginHost::SendBuffersSwappedToEmbedder(uint64 surface_handle, const BrowserPlugin_SwapInfo& info) {
|
| + DCHECK(embedder_render_process_host());
|
| + embedder_render_process_host()->Send(
|
| + new BrowserPluginMsg_BuffersSwapped(instance_id_, surface_handle, info));
|
| +}
|
| +
|
| +
|
| void BrowserPluginHost::AddGuest(WebContentsImpl* guest, int64 frame_id) {
|
| guests_[guest] = frame_id;
|
| }
|
| @@ -284,12 +293,12 @@ void BrowserPluginHost::Observe(
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| switch (type) {
|
| - case NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
|
| + case NOTIFICATION_WILL_CREATE_RENDER_VIEW: {
|
| RenderViewHost* render_view_host =
|
| Details<RenderViewHost>(details).ptr();
|
| // BrowserPluginHostHelper is destroyed when its associated RenderViewHost
|
| // is destroyed.
|
| - new BrowserPluginHostHelper(this, render_view_host);
|
| + new BrowserPluginHostHelper(this, render_view_host, surface_params_);
|
| break;
|
| }
|
| case NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED: {
|
|
|