Index: content/browser/renderer_host/render_widget_host_view_android.h |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h |
index e1cf270d43dff9e83bd08433d673feb78fc76576..9e02bcc771ba74465ec7cddecb384944f527cf27 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.h |
+++ b/content/browser/renderer_host/render_widget_host_view_android.h |
@@ -195,9 +195,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
void OnCompositingDidCommit() override; |
void OnAttachCompositor() override; |
void OnDetachCompositor() override; |
+ void OnVisibilityChanged(bool visible) override; |
void OnVSync(base::TimeTicks frame_time, |
base::TimeDelta vsync_period) override; |
void OnAnimate(base::TimeTicks begin_frame_time) override; |
+ void OnActivityPaused() override; |
+ void OnActivityResumed() override; |
// DelegatedFrameEvictor implementation |
void EvictDelegatedFrame() override; |
@@ -409,6 +412,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
size_t locks_on_frame_count_; |
bool observing_root_window_; |
+ // If the activity is paused while the widget is visible, lock the |
+ // surface. This ensures that visual content is seamlessly preserved until |
+ // either window visibility is lost (e.g., when the activity is backgrounded), |
+ // or the activity resumes. |
+ bool should_unlock_surface_on_visibility_lost_or_activity_resumed_; |
+ |
struct LastFrameInfo { |
LastFrameInfo(uint32 output_id, |
scoped_ptr<cc::CompositorFrame> output_frame); |