dom/audiochannel/AudioChannelServiceChild.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:60a4ea3d022f
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef mozilla_dom_audiochannelservicechild_h__
8 #define mozilla_dom_audiochannelservicechild_h__
9
10 #include "nsAutoPtr.h"
11 #include "nsISupports.h"
12
13 #include "AudioChannelService.h"
14 #include "AudioChannelCommon.h"
15
16 namespace mozilla {
17 namespace dom {
18
19 class AudioChannelServiceChild : public AudioChannelService
20 {
21 public:
22
23 /**
24 * Returns the AudioChannelServce singleton. Only to be called from main
25 * thread.
26 *
27 * @return NS_OK on proper assignment, NS_ERROR_FAILURE otherwise.
28 */
29 static AudioChannelService* GetAudioChannelService();
30
31 static void Shutdown();
32
33 virtual void RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
34 AudioChannel aChannel,
35 bool aWithVideo);
36 virtual void UnregisterAudioChannelAgent(AudioChannelAgent* aAgent);
37
38 /**
39 * Return the state to indicate this agent should keep playing/
40 * fading volume/muted.
41 */
42 virtual AudioChannelState GetState(AudioChannelAgent* aAgent,
43 bool aElementHidden);
44
45 virtual void SetDefaultVolumeControlChannel(int32_t aChannel,
46 bool aHidden);
47
48 protected:
49 AudioChannelServiceChild();
50 virtual ~AudioChannelServiceChild();
51 };
52
53 } // namespace dom
54 } // namespace mozilla
55
56 #endif
57

mercurial