michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GetUserMediaRequest_h__ michael@0: #define GetUserMediaRequest_h__ michael@0: michael@0: #include "mozilla/ErrorResult.h" michael@0: #include "nsISupportsImpl.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "nsWrapperCache.h" michael@0: #include "mozilla/dom/BindingUtils.h" michael@0: #include "nsPIDOMWindow.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: class MediaStreamConstraints; michael@0: michael@0: class GetUserMediaRequest : public nsISupports, public nsWrapperCache michael@0: { michael@0: public: michael@0: GetUserMediaRequest(nsPIDOMWindow* aInnerWindow, michael@0: const nsAString& aCallID, michael@0: const MediaStreamConstraints& aConstraints, michael@0: bool aIsSecure); michael@0: virtual ~GetUserMediaRequest() {}; michael@0: michael@0: NS_DECL_CYCLE_COLLECTING_ISUPPORTS michael@0: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest) michael@0: michael@0: virtual JSObject* WrapObject(JSContext* cx) michael@0: MOZ_OVERRIDE; michael@0: nsISupports* GetParentObject(); michael@0: michael@0: uint64_t WindowID(); michael@0: uint64_t InnerWindowID(); michael@0: bool IsSecure(); michael@0: void GetCallID(nsString& retval); michael@0: void GetConstraints(MediaStreamConstraints &result); michael@0: michael@0: private: michael@0: uint64_t mInnerWindowID, mOuterWindowID; michael@0: const nsString mCallID; michael@0: nsAutoPtr mConstraints; michael@0: bool mIsSecure; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // GetUserMediaRequest_h__