2013-09-16 10:34:57 +04: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-19 04:57:51 +04:00
|
|
|
|
|
|
|
struct MediaStreamConstraints;
|
2013-09-16 10:34:57 +04:00
|
|
|
|
|
|
|
class GetUserMediaRequest : public nsISupports, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
2014-02-14 23:32:58 +04:00
|
|
|
GetUserMediaRequest(nsPIDOMWindow* aInnerWindow,
|
|
|
|
const nsAString& aCallID,
|
2014-04-18 22:00:16 +04:00
|
|
|
const MediaStreamConstraints& aConstraints,
|
2014-04-16 10:22:19 +04:00
|
|
|
bool aIsSecure);
|
2013-09-16 10:34:57 +04:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest)
|
|
|
|
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
|
2015-03-21 19:28:04 +03:00
|
|
|
override;
|
2013-09-16 10:34:57 +04:00
|
|
|
nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
uint64_t WindowID();
|
2014-02-14 23:32:58 +04:00
|
|
|
uint64_t InnerWindowID();
|
2014-04-16 10:22:19 +04:00
|
|
|
bool IsSecure();
|
2013-09-16 10:34:57 +04:00
|
|
|
void GetCallID(nsString& retval);
|
2014-04-18 22:00:16 +04:00
|
|
|
void GetConstraints(MediaStreamConstraints &result);
|
2013-09-16 10:34:57 +04:00
|
|
|
|
|
|
|
private:
|
2014-06-23 23:56:07 +04:00
|
|
|
virtual ~GetUserMediaRequest() {}
|
|
|
|
|
2014-02-14 23:32:58 +04:00
|
|
|
uint64_t mInnerWindowID, mOuterWindowID;
|
2013-09-16 10:34:57 +04:00
|
|
|
const nsString mCallID;
|
2014-04-18 22:00:16 +04:00
|
|
|
nsAutoPtr<MediaStreamConstraints> mConstraints;
|
2014-04-16 10:22:19 +04:00
|
|
|
bool mIsSecure;
|
2013-09-16 10:34:57 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // GetUserMediaRequest_h__
|