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 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef GetUserMediaRequest_h__
6 #define GetUserMediaRequest_h__
8 #include "mozilla/ErrorResult.h"
9 #include "nsISupportsImpl.h"
10 #include "nsAutoPtr.h"
11 #include "nsWrapperCache.h"
12 #include "mozilla/dom/BindingUtils.h"
13 #include "nsPIDOMWindow.h"
15 namespace mozilla {
16 namespace dom {
17 class MediaStreamConstraints;
19 class GetUserMediaRequest : public nsISupports, public nsWrapperCache
20 {
21 public:
22 GetUserMediaRequest(nsPIDOMWindow* aInnerWindow,
23 const nsAString& aCallID,
24 const MediaStreamConstraints& aConstraints,
25 bool aIsSecure);
26 virtual ~GetUserMediaRequest() {};
28 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
29 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest)
31 virtual JSObject* WrapObject(JSContext* cx)
32 MOZ_OVERRIDE;
33 nsISupports* GetParentObject();
35 uint64_t WindowID();
36 uint64_t InnerWindowID();
37 bool IsSecure();
38 void GetCallID(nsString& retval);
39 void GetConstraints(MediaStreamConstraints &result);
41 private:
42 uint64_t mInnerWindowID, mOuterWindowID;
43 const nsString mCallID;
44 nsAutoPtr<MediaStreamConstraints> mConstraints;
45 bool mIsSecure;
46 };
48 } // namespace dom
49 } // namespace mozilla
51 #endif // GetUserMediaRequest_h__