Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
7 #ifndef mozilla_dom_audiochannelservicechild_h__
8 #define mozilla_dom_audiochannelservicechild_h__
10 #include "nsAutoPtr.h"
11 #include "nsISupports.h"
13 #include "AudioChannelService.h"
14 #include "AudioChannelCommon.h"
16 namespace mozilla {
17 namespace dom {
19 class AudioChannelServiceChild : public AudioChannelService
20 {
21 public:
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();
31 static void Shutdown();
33 virtual void RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
34 AudioChannel aChannel,
35 bool aWithVideo);
36 virtual void UnregisterAudioChannelAgent(AudioChannelAgent* aAgent);
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);
45 virtual void SetDefaultVolumeControlChannel(int32_t aChannel,
46 bool aHidden);
48 protected:
49 AudioChannelServiceChild();
50 virtual ~AudioChannelServiceChild();
51 };
53 } // namespace dom
54 } // namespace mozilla
56 #endif