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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 24
25 #include "config.h" 25 #include "config.h"
26 26
27 #include "modules/mediastream/RTCStatsRequestImpl.h" 27 #include "modules/mediastream/RTCStatsRequestImpl.h"
28 28
29 #include "modules/mediastream/MediaStreamTrack.h" 29 #include "modules/mediastream/MediaStreamTrack.h"
30 #include "modules/mediastream/RTCStatsCallback.h" 30 #include "modules/mediastream/RTCStatsCallback.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 PassRefPtr<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ExecutionContext* co ntext, PassRefPtr<RTCStatsCallback> callback, PassRefPtr<MediaStreamTrack> selec tor) 34 PassRefPtr<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ExecutionContext* co ntext, PassOwnPtr<RTCStatsCallback> callback, PassRefPtr<MediaStreamTrack> selec tor)
35 { 35 {
36 RefPtr<RTCStatsRequestImpl> request = adoptRef(new RTCStatsRequestImpl(conte xt, callback, selector)); 36 RefPtr<RTCStatsRequestImpl> request = adoptRef(new RTCStatsRequestImpl(conte xt, callback, selector));
37 request->suspendIfNeeded(); 37 request->suspendIfNeeded();
38 return request.release(); 38 return request.release();
39 } 39 }
40 40
41 RTCStatsRequestImpl::RTCStatsRequestImpl(ExecutionContext* context, PassRefPtr<R TCStatsCallback> callback, PassRefPtr<MediaStreamTrack> selector) 41 RTCStatsRequestImpl::RTCStatsRequestImpl(ExecutionContext* context, PassOwnPtr<R TCStatsCallback> callback, PassRefPtr<MediaStreamTrack> selector)
42 : ActiveDOMObject(context) 42 : ActiveDOMObject(context)
43 , m_successCallback(callback) 43 , m_successCallback(callback)
44 , m_component(selector ? selector->component() : 0) 44 , m_component(selector ? selector->component() : 0)
45 { 45 {
46 } 46 }
47 47
48 RTCStatsRequestImpl::~RTCStatsRequestImpl() 48 RTCStatsRequestImpl::~RTCStatsRequestImpl()
49 { 49 {
50 } 50 }
51 51
(...skipping 24 matching lines...) Expand all
76 { 76 {
77 clear(); 77 clear();
78 } 78 }
79 79
80 void RTCStatsRequestImpl::clear() 80 void RTCStatsRequestImpl::clear()
81 { 81 {
82 m_successCallback.clear(); 82 m_successCallback.clear();
83 } 83 }
84 84
85 } // namespace WebCore 85 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCStatsRequestImpl.h ('k') | Source/modules/mediastream/RTCVoidRequestImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698