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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 1473913003: Restore original WebView SurfaceId after showing interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 656f2e80c73f2492052218469ed6aa6c2c21f532..c0f2c1be65838132c11429c9793c1bc384e11ff9 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -95,8 +95,14 @@ void RenderWidgetHostViewGuest::Show() {
// The two sizes may fall out of sync if we switch RenderWidgetHostViews,
// resize, and then switch page, as is the case with interstitial pages.
// NOTE: |guest_| is NULL in unit tests.
- if (guest_)
+ if (guest_) {
SetSize(guest_->web_contents()->GetViewBounds().size());
+ if (!surface_id_.is_null()) {
+ guest_->SetChildFrameSurface(surface_id_, current_surface_size_,
+ current_surface_scale_factor_,
+ surface_sequence_);
kenrb 2015/11/25 21:44:02 I wonder if it might be safer to destroy any exist
wjmaclean 2015/11/25 21:50:17 Acknowledged.
+ }
+ }
host_->WasShown(ui::LatencyInfo());
}
@@ -255,14 +261,15 @@ void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
surface_id_ = id_allocator_->GenerateId();
surface_factory_->Create(surface_id_);
- cc::SurfaceSequence sequence = cc::SurfaceSequence(
- id_allocator_->id_namespace(), next_surface_sequence_++);
+ surface_sequence_ = cc::SurfaceSequence(
+ id_allocator_->id_namespace(), surface_sequence_.sequence + 1);
// The renderer process will satisfy this dependency when it creates a
// SurfaceLayer.
cc::SurfaceManager* manager = GetSurfaceManager();
- manager->GetSurfaceForId(surface_id_)->AddDestructionDependency(sequence);
+ manager->GetSurfaceForId(surface_id_)
+ ->AddDestructionDependency(surface_sequence_);
guest_->SetChildFrameSurface(surface_id_, frame_size, scale_factor,
- sequence);
+ surface_sequence_);
}
cc::SurfaceFactory::DrawCallback ack_callback = base::Bind(
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698