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_ |