Chromium Code Reviews| Index: chrome/browser/media/audio_stream_indicator.h |
| diff --git a/chrome/browser/media/audio_stream_indicator.h b/chrome/browser/media/audio_stream_indicator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..92097493b3fde77f790b49b8d8035ccafcd5d085 |
| --- /dev/null |
| +++ b/chrome/browser/media/audio_stream_indicator.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2012 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 CHROME_BROWSER_MEDIA_AUDIO_STREAM_INDICATOR_H_ |
| +#define CHROME_BROWSER_MEDIA_AUDIO_STREAM_INDICATOR_H_ |
| + |
| +#include <set> |
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace content { |
| +class WebContents; |
| +} |
| + |
| +class AudioStreamIndicator |
| + : public base::RefCountedThreadSafe<AudioStreamIndicator> { |
| + public: |
| + AudioStreamIndicator(); |
| + |
| + // This method should be called on the IO thread. |
| + void UpdateWebContentsStatus(int render_process_id, |
| + int render_view_id, |
|
miu
2012/12/19 00:49:08
Please fix indentation here.
Bernhard Bauer
2013/02/05 18:45:18
Done.
|
| + bool playing); |
| + |
| + // This method should be called on the IO thread. |
| + bool IsPlayingAudio(content::WebContents* contents); |
| + |
| + private: |
| + friend class base::RefCountedThreadSafe<AudioStreamIndicator>; |
| + virtual ~AudioStreamIndicator(); |
| + |
| + void UpdateWebContentsStatusOnUIThread(int render_process_id, |
| + int render_view_id, |
|
miu
2012/12/19 00:49:08
Ditto (fix indentation).
Bernhard Bauer
2013/02/05 18:45:18
Done.
|
| + bool playing); |
| + |
| + std::multiset<std::pair<int, int> > audio_streams_; |
|
miu
2012/12/19 00:49:08
Please document this member. I assume it's the se
miu
2012/12/19 00:49:08
Why is this a multiset<>? Won't a set<> do the jo
tommi (sloooow) - chröme
2012/12/19 11:47:29
Instead of using std::pair, let's just define a pr
Bernhard Bauer
2013/02/05 18:45:18
Done.
Bernhard Bauer
2013/02/05 18:45:18
Done.
Bernhard Bauer
2013/02/05 18:45:18
It's a multiset because it has one entry per audio
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_MEDIA_AUDIO_STREAM_INDICATOR_H_ |