Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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__