OLD | NEW |
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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 , m_errorCallback(errorCallback) | 54 , m_errorCallback(errorCallback) |
55 , m_requester(requester) | 55 , m_requester(requester) |
56 { | 56 { |
57 ASSERT(m_requester); | 57 ASSERT(m_requester); |
58 } | 58 } |
59 | 59 |
60 RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl() | 60 RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl() |
61 { | 61 { |
62 } | 62 } |
63 | 63 |
64 void RTCSessionDescriptionRequestImpl::requestSucceeded(const blink::WebRTCSessi
onDescription& webSessionDescription) | 64 void RTCSessionDescriptionRequestImpl::requestSucceeded(const WebRTCSessionDescr
iption& webSessionDescription) |
65 { | 65 { |
66 bool shouldFireCallback = m_requester ? m_requester->shouldFireDefaultCallba
cks() : false; | 66 bool shouldFireCallback = m_requester ? m_requester->shouldFireDefaultCallba
cks() : false; |
67 if (shouldFireCallback && m_successCallback) | 67 if (shouldFireCallback && m_successCallback) |
68 m_successCallback->handleEvent(RTCSessionDescription::create(webSessionD
escription)); | 68 m_successCallback->handleEvent(RTCSessionDescription::create(webSessionD
escription)); |
69 clear(); | 69 clear(); |
70 } | 70 } |
71 | 71 |
72 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error) | 72 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error) |
73 { | 73 { |
74 bool shouldFireCallback = m_requester ? m_requester->shouldFireDefaultCallba
cks() : false; | 74 bool shouldFireCallback = m_requester ? m_requester->shouldFireDefaultCallba
cks() : false; |
75 if (shouldFireCallback && m_errorCallback) | 75 if (shouldFireCallback && m_errorCallback) |
76 m_errorCallback->handleEvent(error); | 76 m_errorCallback->handleEvent(error); |
77 | 77 |
78 clear(); | 78 clear(); |
79 } | 79 } |
80 | 80 |
81 void RTCSessionDescriptionRequestImpl::stop() | 81 void RTCSessionDescriptionRequestImpl::stop() |
82 { | 82 { |
83 clear(); | 83 clear(); |
84 } | 84 } |
85 | 85 |
86 void RTCSessionDescriptionRequestImpl::clear() | 86 void RTCSessionDescriptionRequestImpl::clear() |
87 { | 87 { |
88 m_successCallback.clear(); | 88 m_successCallback.clear(); |
89 m_errorCallback.clear(); | 89 m_errorCallback.clear(); |
90 m_requester.clear(); | 90 m_requester.clear(); |
91 } | 91 } |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
OLD | NEW |