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

Unified Diff: content/browser/android/audio_monitor_android.h

Issue 896673003: Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/android/audio_monitor_android.h
diff --git a/content/browser/android/audio_monitor_android.h b/content/browser/android/audio_monitor_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0eb6f1ee36e25784d80b14a30bf03ae1cd6d4c0
--- /dev/null
+++ b/content/browser/android/audio_monitor_android.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_
+#define CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_
+
+#include <map>
+
+namespace content {
+
+class WebContents;
+class RenderFrameHost;
+
+class AudioMonitorAndroid {
qinmin 2015/02/03 20:33:24 docs
Tima Vaisburd 2015/02/03 23:53:04 Done.
+ public:
+ explicit AudioMonitorAndroid(WebContents* web_contents);
+ ~AudioMonitorAndroid();
+
+ bool IsAudible() const;
qinmin 2015/02/03 20:33:24 since this is just a simple getter function, just
Tima Vaisburd 2015/02/03 23:53:04 Done.
+ void OnAudibleStateChanged(RenderFrameHost* rfh, int player_id,
qinmin 2015/02/03 20:33:24 missing docs for all the member functions
Tima Vaisburd 2015/02/03 23:53:04 Done.
+ bool is_audible);
+ void RemovePlayer(RenderFrameHost* rfh, int player_id);
+ void RenderFrameDeleted(RenderFrameHost* rfh);
+
+ private:
+ void UpdateStatusAndNotify();
+
+
qinmin 2015/02/03 20:33:24 extra blank line
Tima Vaisburd 2015/02/03 23:53:04 Done.
+ WebContents* web_contents_;
+
+ typedef std::pair<RenderFrameHost*, int> Key;
+ typedef std::map<Key, bool> StatusMap;
+ StatusMap players_;
qinmin 2015/02/03 20:33:24 players_ is not a good variable name here, what ab
Tima Vaisburd 2015/02/03 23:53:05 Done.
+
+ bool is_audible_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_
« no previous file with comments | « no previous file | content/browser/android/audio_monitor_android.cc » ('j') | content/browser/android/audio_monitor_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698