dom/media/GetUserMediaRequest.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:02d7695d464b
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/. */
4
5 #ifndef GetUserMediaRequest_h__
6 #define GetUserMediaRequest_h__
7
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"
14
15 namespace mozilla {
16 namespace dom {
17 class MediaStreamConstraints;
18
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() {};
27
28 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
29 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest)
30
31 virtual JSObject* WrapObject(JSContext* cx)
32 MOZ_OVERRIDE;
33 nsISupports* GetParentObject();
34
35 uint64_t WindowID();
36 uint64_t InnerWindowID();
37 bool IsSecure();
38 void GetCallID(nsString& retval);
39 void GetConstraints(MediaStreamConstraints &result);
40
41 private:
42 uint64_t mInnerWindowID, mOuterWindowID;
43 const nsString mCallID;
44 nsAutoPtr<MediaStreamConstraints> mConstraints;
45 bool mIsSecure;
46 };
47
48 } // namespace dom
49 } // namespace mozilla
50
51 #endif // GetUserMediaRequest_h__

mercurial