Changeset 212163 in webkit


Ignore:
Timestamp:
Feb 10, 2017 3:55:14 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Add mediaStreamEnabled property to WKPreferences for Cocoa.
https://bugs.webkit.org/show_bug.cgi?id=168080

Patch by Andrew Gold <agold@apple.com> on 2017-02-10
Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
(-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
(-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r212160 r212163  
     12017-02-10  Andrew Gold  <agold@apple.com>
     2
     3        Add mediaStreamEnabled property to WKPreferences for Cocoa.
     4        https://bugs.webkit.org/show_bug.cgi?id=168080
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/API/Cocoa/WKWebView.mm:
     9        (-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.
     10
     11        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
     12        (-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
     13        (-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
     14        (-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.
     15        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
     16
    1172017-02-10  Olivier Blin  <olivier.blin@softathome.com>
    218
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r211929 r212163  
    434434    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
    435435    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
     436#if ENABLE(MEDIA_STREAM)
     437    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaStreamEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaStreamEnabled]));
     438#endif
    436439    pageConfiguration->setInitialCapitalizationEnabled([_configuration _initialCapitalizationEnabled]);
    437440    pageConfiguration->setWaitsForPaintAfterViewDidMoveToWindow([_configuration _waitsForPaintAfterViewDidMoveToWindow]);
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r212134 r212163  
    126126    BOOL _waitsForPaintAfterViewDidMoveToWindow;
    127127    BOOL _controlledByAutomation;
     128#if ENABLE(MEDIA_STREAM)
     129    BOOL _mediaStreamEnabled;
     130#endif
    128131
    129132#if ENABLE(APPLE_PAY)
     
    294297    configuration->_waitsForPaintAfterViewDidMoveToWindow = self->_waitsForPaintAfterViewDidMoveToWindow;
    295298    configuration->_controlledByAutomation = self->_controlledByAutomation;
     299#if ENABLE(MEDIA_STREAM)
     300    configuration->_mediaStreamEnabled = self->_mediaStreamEnabled;
     301#endif
    296302
    297303#if PLATFORM(IOS)
     
    687693}
    688694
     695- (BOOL)_mediaStreamEnabled
     696{
     697#if ENABLE(MEDIA_STREAM)
     698    return _mediaStreamEnabled;
     699#else
     700    return NO;
     701#endif
     702}
     703
     704- (void)_setMediaStreamEnabled:(BOOL)enabled
     705{
     706#if ENABLE(MEDIA_STREAM)
     707    _mediaStreamEnabled = enabled;
     708#endif
     709}
     710
    689711#if PLATFORM(MAC)
    690712- (BOOL)_showsURLsInToolTips
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h

    r211656 r212163  
    5959@property (nonatomic, setter=_setWaitsForPaintAfterViewDidMoveToWindow:) BOOL _waitsForPaintAfterViewDidMoveToWindow WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    6060@property (nonatomic, setter=_setControlledByAutomation:, getter=_isControlledByAutomation) BOOL _controlledByAutomation WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
     61@property (nonatomic, setter=_setMediaStreamEnabled:) BOOL _mediaStreamEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    6162
    6263#if TARGET_OS_IPHONE
Note: See TracChangeset for help on using the changeset viewer.