Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2458833003: Revert of [M55] Generalize layer mirroring for phantom windows (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 44ba98b348de23a2f646d84f6667e92c03e781eb..a5f9b79a96f409a5e730246ad0aa397d7b712ddb 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -893,4 +893,24 @@
delegated_frame_evictor_->UnlockFrame();
}
+////////////////////////////////////////////////////////////////////////////////
+// DelegatedFrameHost, ui::LayerOwnerDelegate implementation:
+
+void DelegatedFrameHost::OnLayerRecreated(ui::Layer* old_layer,
+ ui::Layer* new_layer) {
+ // The new_layer is the one that will be used by our Window, so that's the one
+ // that should keep our frame. old_layer will be returned to the
+ // RecreateLayer caller, and should have a copy.
+ if (!local_frame_id_.is_null()) {
+ ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
+ cc::SurfaceManager* manager = factory->GetSurfaceManager();
+ new_layer->SetShowSurface(
+ cc::SurfaceId(frame_sink_id_, local_frame_id_),
+ base::Bind(&SatisfyCallback, base::Unretained(manager)),
+ base::Bind(&RequireCallback, base::Unretained(manager)),
+ current_surface_size_, current_scale_factor_,
+ current_frame_size_in_dip_);
+ }
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698