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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 12179007: While screencasting a tab, do not disable rendering updates while hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Execute delayed WasHidden() when capturer_count_ goes to zero. Created 7 years, 10 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/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index b25ff17f9546f91629ae16a7ae4cb60bf67905d2..7b7b68fa306fcdc9958b4cf5e7fb5eed6b4ee2a5 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -215,7 +215,8 @@ class CONTENT_EXPORT WebContentsImpl
virtual uint64 GetUploadPosition() const OVERRIDE;
virtual const std::string& GetEncoding() const OVERRIDE;
virtual bool DisplayedInsecureContent() const OVERRIDE;
- virtual void SetCapturingContents(bool cap) OVERRIDE;
+ virtual void IncrementCapturerCount() OVERRIDE;
+ virtual void DecrementCapturerCount() OVERRIDE;
virtual bool IsCrashed() const OVERRIDE;
virtual void SetIsCrashed(base::TerminationStatus status,
int error_code) OVERRIDE;
@@ -784,8 +785,13 @@ class CONTENT_EXPORT WebContentsImpl
// Data for misc internal state ----------------------------------------------
- // Whether the WebContents is currently being screenshotted.
- bool capturing_contents_;
+ // When > 0, the WebContents is currently being captured (e.g., for
+ // screenshots or mirroring); and the underlying RenderWidgetHost should not
+ // be told it is hidden.
+ int capturer_count_;
+
+ // Tracks whether RWHV should be visible once capturer_count_ becomes zero.
+ bool should_normally_be_visible_;
// See getter above.
bool is_being_destroyed_;

Powered by Google App Engine
This is Rietveld 408576698