2013-09-15 23:34:57 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef GetUserMediaRequest_h__
|
|
|
|
#define GetUserMediaRequest_h__
|
|
|
|
|
|
|
|
#include "mozilla/ErrorResult.h"
|
|
|
|
#include "nsISupportsImpl.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
#include "mozilla/dom/BindingUtils.h"
|
|
|
|
#include "nsPIDOMWindow.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2014-06-18 17:57:51 -07:00
|
|
|
|
|
|
|
struct MediaStreamConstraints;
|
2013-09-15 23:34:57 -07:00
|
|
|
|
|
|
|
class GetUserMediaRequest : public nsISupports, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
2014-02-14 11:32:58 -08:00
|
|
|
GetUserMediaRequest(nsPIDOMWindow* aInnerWindow,
|
|
|
|
const nsAString& aCallID,
|
2014-04-18 11:00:16 -07:00
|
|
|
const MediaStreamConstraints& aConstraints,
|
2014-04-15 23:22:19 -07:00
|
|
|
bool aIsSecure);
|
2013-09-15 23:34:57 -07:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest)
|
|
|
|
|
2014-04-08 15:27:18 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx)
|
2013-09-15 23:34:57 -07:00
|
|
|
MOZ_OVERRIDE;
|
|
|
|
nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
uint64_t WindowID();
|
2014-02-14 11:32:58 -08:00
|
|
|
uint64_t InnerWindowID();
|
2014-04-15 23:22:19 -07:00
|
|
|
bool IsSecure();
|
2013-09-15 23:34:57 -07:00
|
|
|
void GetCallID(nsString& retval);
|
2014-04-18 11:00:16 -07:00
|
|
|
void GetConstraints(MediaStreamConstraints &result);
|
2013-09-15 23:34:57 -07:00
|
|
|
|
|
|
|
private:
|
2014-06-23 12:56:07 -07:00
|
|
|
virtual ~GetUserMediaRequest() {}
|
|
|
|
|
2014-02-14 11:32:58 -08:00
|
|
|
uint64_t mInnerWindowID, mOuterWindowID;
|
2013-09-15 23:34:57 -07:00
|
|
|
const nsString mCallID;
|
2014-04-18 11:00:16 -07:00
|
|
|
nsAutoPtr<MediaStreamConstraints> mConstraints;
|
2014-04-15 23:22:19 -07:00
|
|
|
bool mIsSecure;
|
2013-09-15 23:34:57 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // GetUserMediaRequest_h__
|