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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 1001573003: [Android] Stop hiding the RWHV layer subtree when hiding the widget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Semi-working build Created 5 years, 9 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/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);

Powered by Google App Engine
This is Rietveld 408576698