1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/media/GetUserMediaRequest.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef GetUserMediaRequest_h__ 1.9 +#define GetUserMediaRequest_h__ 1.10 + 1.11 +#include "mozilla/ErrorResult.h" 1.12 +#include "nsISupportsImpl.h" 1.13 +#include "nsAutoPtr.h" 1.14 +#include "nsWrapperCache.h" 1.15 +#include "mozilla/dom/BindingUtils.h" 1.16 +#include "nsPIDOMWindow.h" 1.17 + 1.18 +namespace mozilla { 1.19 +namespace dom { 1.20 +class MediaStreamConstraints; 1.21 + 1.22 +class GetUserMediaRequest : public nsISupports, public nsWrapperCache 1.23 +{ 1.24 +public: 1.25 + GetUserMediaRequest(nsPIDOMWindow* aInnerWindow, 1.26 + const nsAString& aCallID, 1.27 + const MediaStreamConstraints& aConstraints, 1.28 + bool aIsSecure); 1.29 + virtual ~GetUserMediaRequest() {}; 1.30 + 1.31 + NS_DECL_CYCLE_COLLECTING_ISUPPORTS 1.32 + NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest) 1.33 + 1.34 + virtual JSObject* WrapObject(JSContext* cx) 1.35 + MOZ_OVERRIDE; 1.36 + nsISupports* GetParentObject(); 1.37 + 1.38 + uint64_t WindowID(); 1.39 + uint64_t InnerWindowID(); 1.40 + bool IsSecure(); 1.41 + void GetCallID(nsString& retval); 1.42 + void GetConstraints(MediaStreamConstraints &result); 1.43 + 1.44 +private: 1.45 + uint64_t mInnerWindowID, mOuterWindowID; 1.46 + const nsString mCallID; 1.47 + nsAutoPtr<MediaStreamConstraints> mConstraints; 1.48 + bool mIsSecure; 1.49 +}; 1.50 + 1.51 +} // namespace dom 1.52 +} // namespace mozilla 1.53 + 1.54 +#endif // GetUserMediaRequest_h__