Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_ | |
| 6 #define CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 class WebContents; | |
| 13 class RenderFrameHost; | |
| 14 | |
| 15 class AudioMonitorAndroid { | |
|
qinmin
2015/02/03 20:33:24
docs
Tima Vaisburd
2015/02/03 23:53:04
Done.
| |
| 16 public: | |
| 17 explicit AudioMonitorAndroid(WebContents* web_contents); | |
| 18 ~AudioMonitorAndroid(); | |
| 19 | |
| 20 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.
| |
| 21 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.
| |
| 22 bool is_audible); | |
| 23 void RemovePlayer(RenderFrameHost* rfh, int player_id); | |
| 24 void RenderFrameDeleted(RenderFrameHost* rfh); | |
| 25 | |
| 26 private: | |
| 27 void UpdateStatusAndNotify(); | |
| 28 | |
| 29 | |
|
qinmin
2015/02/03 20:33:24
extra blank line
Tima Vaisburd
2015/02/03 23:53:04
Done.
| |
| 30 WebContents* web_contents_; | |
| 31 | |
| 32 typedef std::pair<RenderFrameHost*, int> Key; | |
| 33 typedef std::map<Key, bool> StatusMap; | |
| 34 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.
| |
| 35 | |
| 36 bool is_audible_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace content | |
| 40 | |
| 41 #endif // CONTENT_BROWSER_ANDROID_AUDIO_MONITOR_ANDROID_H_ | |
| OLD | NEW |