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