Changeset 215801 in webkit


Ignore:
Timestamp:
Apr 26, 2017 8:55:34 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Move mediaCaptureEnabled from WKWebViewConfiguration to WKPreferences
https://bugs.webkit.org/show_bug.cgi?id=171294

Patch by Andrew Gold <agold@apple.com> on 2017-04-26
Reviewed by Eric Carlson.

Since we now want the ability to toggle this setting dynamically, I have
moved it from WKWebViewConfiguration to WKPreferences.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mediaStreamEnabled]):
(-[WKPreferences _setMediaStreamEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): No longer set mediaStream enabled from
the configuration.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _mediaStreamEnabled]): Deleted.
(-[WKWebViewConfiguration _setMediaStreamEnabled:]): Deleted.

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r215790 r215801  
     12017-04-26  Andrew Gold  <agold@apple.com>
     2
     3        Move mediaCaptureEnabled from WKWebViewConfiguration to WKPreferences
     4        https://bugs.webkit.org/show_bug.cgi?id=171294
     5
     6        Reviewed by Eric Carlson.
     7
     8        Since we now want the ability to toggle this setting dynamically, I have
     9        moved it from WKWebViewConfiguration to WKPreferences.
     10
     11        * UIProcess/API/Cocoa/WKPreferences.mm:
     12        (-[WKPreferences _mediaStreamEnabled]):
     13        (-[WKPreferences _setMediaStreamEnabled:]):
     14
     15        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
     16        * UIProcess/API/Cocoa/WKWebView.mm:
     17        (-[WKWebView _initializeWithConfiguration:]): No longer set mediaStream enabled from
     18        the configuration.
     19
     20        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
     21        (-[WKWebViewConfiguration copyWithZone:]):
     22        (-[WKWebViewConfiguration _mediaStreamEnabled]): Deleted.
     23        (-[WKWebViewConfiguration _setMediaStreamEnabled:]): Deleted.
     24        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
     25
    1262017-04-25  Alex Christensen  <achristensen@webkit.org>
    227
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm

    r215271 r215801  
    548548}
    549549
     550- (BOOL)_mediaStreamEnabled
     551{
     552    return _preferences->mediaStreamEnabled();
     553}
     554
     555- (void)_setMediaStreamEnabled:(BOOL)enabled
     556{
     557    _preferences->setMediaStreamEnabled(enabled);
     558}
     559
    550560- (BOOL)_mockCaptureDevicesEnabled
    551561{
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h

    r215271 r215801  
    9999@property (nonatomic, setter=_setLoadsImagesAutomatically:) BOOL _loadsImagesAutomatically WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    100100
     101@property (nonatomic, setter=_setMediaStreamEnabled:) BOOL _mediaStreamEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    101102@property (nonatomic, setter=_setMockCaptureDevicesEnabled:) BOOL _mockCaptureDevicesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    102103@property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r215772 r215801  
    448448    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
    449449    pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
    450 #if ENABLE(MEDIA_STREAM)
    451     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaStreamEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaStreamEnabled]));
    452 #endif
    453450    pageConfiguration->setInitialCapitalizationEnabled([_configuration _initialCapitalizationEnabled]);
    454451    pageConfiguration->setWaitsForPaintAfterViewDidMoveToWindow([_configuration _waitsForPaintAfterViewDidMoveToWindow]);
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r215627 r215801  
    130130    BOOL _waitsForPaintAfterViewDidMoveToWindow;
    131131    BOOL _controlledByAutomation;
    132 #if ENABLE(MEDIA_STREAM)
    133     BOOL _mediaStreamEnabled;
    134 #endif
    135132
    136133#if ENABLE(APPLE_PAY)
     
    302299    configuration->_waitsForPaintAfterViewDidMoveToWindow = self->_waitsForPaintAfterViewDidMoveToWindow;
    303300    configuration->_controlledByAutomation = self->_controlledByAutomation;
    304 #if ENABLE(MEDIA_STREAM)
    305     configuration->_mediaStreamEnabled = self->_mediaStreamEnabled;
    306 #endif
    307301
    308302#if PLATFORM(IOS)
     
    732726}
    733727
    734 - (BOOL)_mediaStreamEnabled
    735 {
    736 #if ENABLE(MEDIA_STREAM)
    737     return _mediaStreamEnabled;
    738 #else
    739     return NO;
    740 #endif
    741 }
    742 
    743 - (void)_setMediaStreamEnabled:(BOOL)enabled
    744 {
    745 #if ENABLE(MEDIA_STREAM)
    746     _mediaStreamEnabled = enabled;
    747 #endif
    748 }
    749 
    750728#if PLATFORM(MAC)
    751729- (BOOL)_showsURLsInToolTips
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h

    r212163 r215801  
    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));
    6261
    6362#if TARGET_OS_IPHONE
Note: See TracChangeset for help on using the changeset viewer.