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

Side by Side Diff: Source/modules/mediastream/UserMediaRequest.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 constraints = MediaConstraintsImpl::create(); 60 constraints = MediaConstraintsImpl::create();
61 } 61 }
62 62
63 return constraints; 63 return constraints;
64 } 64 }
65 65
66 PassRefPtr<UserMediaRequest> UserMediaRequest::create(ExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassOwnPtr<Navigato rUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCa llback> errorCallback, ExceptionState& exceptionState) 66 PassRefPtr<UserMediaRequest> UserMediaRequest::create(ExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassOwnPtr<Navigato rUserMediaSuccessCallback> successCallback, PassOwnPtr<NavigatorUserMediaErrorCa llback> errorCallback, ExceptionState& exceptionState)
67 { 67 {
68 blink::WebMediaConstraints audio = parseOptions(options, "audio", exceptionS tate); 68 blink::WebMediaConstraints audio = parseOptions(options, "audio", exceptionS tate);
69 if (exceptionState.hadException()) 69 if (exceptionState.hadException())
70 return 0; 70 return nullptr;
71 71
72 blink::WebMediaConstraints video = parseOptions(options, "video", exceptionS tate); 72 blink::WebMediaConstraints video = parseOptions(options, "video", exceptionS tate);
73 if (exceptionState.hadException()) 73 if (exceptionState.hadException())
74 return 0; 74 return nullptr;
75 75
76 if (audio.isNull() && video.isNull()) 76 if (audio.isNull() && video.isNull())
77 return 0; 77 return nullptr;
78 78
79 return adoptRef(new UserMediaRequest(context, controller, audio, video, succ essCallback, errorCallback)); 79 return adoptRef(new UserMediaRequest(context, controller, audio, video, succ essCallback, errorCallback));
80 } 80 }
81 81
82 UserMediaRequest::UserMediaRequest(ExecutionContext* context, UserMediaControlle r* controller, blink::WebMediaConstraints audio, blink::WebMediaConstraints vide o, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<Nav igatorUserMediaErrorCallback> errorCallback) 82 UserMediaRequest::UserMediaRequest(ExecutionContext* context, UserMediaControlle r* controller, blink::WebMediaConstraints audio, blink::WebMediaConstraints vide o, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, PassOwnPtr<Nav igatorUserMediaErrorCallback> errorCallback)
83 : ContextLifecycleObserver(context) 83 : ContextLifecycleObserver(context)
84 , m_audio(audio) 84 , m_audio(audio)
85 , m_video(video) 85 , m_video(video)
86 , m_controller(controller) 86 , m_controller(controller)
87 , m_successCallback(successCallback) 87 , m_successCallback(successCallback)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 if (m_controller) { 178 if (m_controller) {
179 m_controller->cancelUserMediaRequest(this); 179 m_controller->cancelUserMediaRequest(this);
180 m_controller = 0; 180 m_controller = 0;
181 } 181 }
182 182
183 ContextLifecycleObserver::contextDestroyed(); 183 ContextLifecycleObserver::contextDestroyed();
184 } 184 }
185 185
186 } // namespace WebCore 186 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCStatsResponse.cpp ('k') | Source/modules/notifications/DOMWindowNotifications.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698