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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW
« 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