Changeset 245856 in webkit
- Timestamp:
- May 29, 2019, 11:12:40 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245855 r245856 1 2019-05-29 Youenn Fablet <youenn@apple.com> 2 3 Modernize getting proxies of UserMediaCaptureManagerProxy 4 https://bugs.webkit.org/show_bug.cgi?id=198336 5 6 Reviewed by Eric Carlson. 7 8 No change of behavior, use HashMap::get instead of find. 9 10 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: 11 (WebKit::UserMediaCaptureManagerProxy::startProducingData): 12 (WebKit::UserMediaCaptureManagerProxy::stopProducingData): 13 (WebKit::UserMediaCaptureManagerProxy::capabilities): 14 (WebKit::UserMediaCaptureManagerProxy::setMuted): 15 (WebKit::UserMediaCaptureManagerProxy::applyConstraints): 16 1 17 2019-05-29 Andy Estes <aestes@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
r243258 r245856 178 178 { 179 179 MESSAGE_CHECK_CONTEXTID(id); 180 auto iter = m_proxies.find(id); 181 if (iter != m_proxies.end()) 182 iter->value->source().start(); 180 if (auto* proxy = m_proxies.get(id)) 181 proxy->source().start(); 183 182 } 184 183 … … 186 185 { 187 186 MESSAGE_CHECK_CONTEXTID(id); 188 auto iter = m_proxies.find(id); 189 if (iter != m_proxies.end()) 190 iter->value->source().stop(); 187 if (auto* proxy = m_proxies.get(id)) 188 proxy->source().stop(); 191 189 } 192 190 … … 201 199 MESSAGE_CHECK_CONTEXTID(id); 202 200 WebCore::RealtimeMediaSourceCapabilities capabilities; 203 auto iter = m_proxies.find(id); 204 if (iter != m_proxies.end()) 205 capabilities = iter->value->source().capabilities(); 201 if (auto* proxy = m_proxies.get(id)) 202 capabilities = proxy->source().capabilities(); 206 203 completionHandler(WTFMove(capabilities)); 207 204 } … … 210 207 { 211 208 MESSAGE_CHECK_CONTEXTID(id); 212 auto iter = m_proxies.find(id); 213 if (iter != m_proxies.end()) 214 iter->value->source().setMuted(muted); 209 if (auto* proxy = m_proxies.get(id)) 210 proxy->source().setMuted(muted); 215 211 } 216 212 … … 218 214 { 219 215 MESSAGE_CHECK_CONTEXTID(id); 220 auto iter = m_proxies.find(id);221 if ( iter == m_proxies.end())216 auto* proxy = m_proxies.get(id); 217 if (!proxy) 222 218 return; 223 219 224 auto& source = iter->value->source();220 auto& source = proxy->source(); 225 221 auto result = source.applyConstraints(constraints); 226 222 if (!result)
Note:
See TracChangeset
for help on using the changeset viewer.