Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Unified Diff: Source/modules/mediastream/NavigatorMediaStream.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediastream/NavigatorMediaStream.cpp
diff --git a/Source/modules/mediastream/NavigatorMediaStream.cpp b/Source/modules/mediastream/NavigatorMediaStream.cpp
index 3814bf2d31408d90b88cfd6e197475f118fb7f3c..77870d6caa2166267c172e7e1c09496a6c104a86 100644
--- a/Source/modules/mediastream/NavigatorMediaStream.cpp
+++ b/Source/modules/mediastream/NavigatorMediaStream.cpp
@@ -47,18 +47,18 @@ NavigatorMediaStream::~NavigatorMediaStream()
{
}
-void NavigatorMediaStream::webkitGetUserMedia(Navigator* navigator, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
+void NavigatorMediaStream::webkitGetUserMedia(Navigator& navigator, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& exceptionState)
{
if (!successCallback)
return;
- UserMediaController* userMedia = UserMediaController::from(navigator->frame() ? navigator->frame()->page() : 0);
+ UserMediaController* userMedia = UserMediaController::from(navigator.frame() ? navigator.frame()->page() : 0);
if (!userMedia) {
exceptionState.throwDOMException(NotSupportedError, "No user media controller available; is this a detached window?");
return;
}
- RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame()->document(), userMedia, options, successCallback, errorCallback, exceptionState);
+ RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator.frame()->document(), userMedia, options, successCallback, errorCallback, exceptionState);
if (!request) {
if (!exceptionState.hadException())
exceptionState.throwDOMException(NotSupportedError, "Failed to request user media.");
@@ -68,15 +68,15 @@ void NavigatorMediaStream::webkitGetUserMedia(Navigator* navigator, const Dictio
request->start();
}
-void NavigatorMediaStream::getMediaDevices(Navigator* navigator, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
+void NavigatorMediaStream::getMediaDevices(Navigator& navigator, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState)
{
- UserMediaController* userMedia = UserMediaController::from(navigator->frame() ? navigator->frame()->page() : 0);
+ UserMediaController* userMedia = UserMediaController::from(navigator.frame() ? navigator.frame()->page() : 0);
if (!userMedia) {
exceptionState.throwDOMException(NotSupportedError, "No media device controller available; is this a detached window?");
return;
}
- RefPtr<MediaDevicesRequest> request = MediaDevicesRequest::create(navigator->frame()->document(), userMedia, callback, exceptionState);
+ RefPtr<MediaDevicesRequest> request = MediaDevicesRequest::create(navigator.frame()->document(), userMedia, callback, exceptionState);
if (!request) {
if (!exceptionState.hadException())
exceptionState.throwDOMException(NotSupportedError, "Failed to request media devices.");

Powered by Google App Engine
This is Rietveld 408576698