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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2948613002: [AudioStreamMonitor] Adds API to collect frame-level audibility. (Closed)
Patch Set: Fix windows build Created 3 years, 6 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index dc24b89172448e10974816d94a9411aae3f4351f..58b1813b2b68216ebf9fb824ff35da32a6413e60 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -248,6 +248,10 @@ class CONTENT_EXPORT RenderFrameHostImpl
// after they are blocked in RenderWidgetHelper::CreateNewWindow.
void Init();
+ // Returns true if the frame recently plays an audio.
+ bool is_audible() const { return is_audible_; }
+ void OnAudibleStateChanged(bool is_audible);
+
int routing_id() const { return routing_id_; }
// Called when this frame has added a child. This is a continuation of an IPC
@@ -1188,6 +1192,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
// If true, then the RenderFrame has selected text.
bool has_selection_;
+ // If true, then this RenderFrame has one or more audio streams with audible
+ // signal. If false, all audio streams are currently silent (or there are no
+ // audio streams).
+ bool is_audible_;
+
// PlzNavigate: The Previews state of the last navigation. This is used during
// history navigation of subframes to ensure that subframes navigate with the
// same Previews status as the top-level frame.
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698