⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245856 in webkit


Ignore:
Timestamp:
May 29, 2019, 11:12:40 AM (7 years ago)
Author:
youenn@apple.com
Message:

Modernize getting proxies of UserMediaCaptureManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=198336

Reviewed by Eric Carlson.

No change of behavior, use HashMap::get instead of find.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::startProducingData):
(WebKit::UserMediaCaptureManagerProxy::stopProducingData):
(WebKit::UserMediaCaptureManagerProxy::capabilities):
(WebKit::UserMediaCaptureManagerProxy::setMuted):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245855 r245856  
     12019-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
    1172019-05-29  Andy Estes  <aestes@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp

    r243258 r245856  
    178178{
    179179    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();
    183182}
    184183
     
    186185{
    187186    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();
    191189}
    192190
     
    201199    MESSAGE_CHECK_CONTEXTID(id);
    202200    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();
    206203    completionHandler(WTFMove(capabilities));
    207204}
     
    210207{
    211208    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);
    215211}
    216212
     
    218214{
    219215    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)
    222218        return;
    223219
    224     auto& source = iter->value->source();
     220    auto& source = proxy->source();
    225221    auto result = source.applyConstraints(constraints);
    226222    if (!result)
Note: See TracChangeset for help on using the changeset viewer.