Changeset 84648 in webkit


Ignore:
Timestamp:
Apr 22, 2011 11:03:04 AM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-04-22 Jer Noble <jer.noble@apple.com>

Reviewed by Maciej Stachowiak.

Allow MediaPlayerPrivateAVFoundation to be disabled via a preference.
https://bugs.webkit.org/show_bug.cgi?id=59179

Add API to allow the WebCore Settings preference to be called from the UIProcess.

  • Shared/WebPreferencesStore.h: Added new preference definition macro.
  • UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetAVFoundationEnabled): Added. (WKPreferencesGetAVFoundationEnabled): Added.
  • UIProcess/API/C/WKPreferences.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Pass new preference along to WebCore

Settings.

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r84643 r84648  
     12011-04-22  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Allow MediaPlayerPrivateAVFoundation to be disabled via a preference.
     6        https://bugs.webkit.org/show_bug.cgi?id=59179
     7
     8        Add API to allow the WebCore Settings preference to be called from the UIProcess.
     9
     10        * Shared/WebPreferencesStore.h: Added new preference definition macro.
     11        * UIProcess/API/C/WKPreferences.cpp:
     12        (WKPreferencesSetAVFoundationEnabled): Added.
     13        (WKPreferencesGetAVFoundationEnabled): Added.
     14        * UIProcess/API/C/WKPreferences.h:
     15        * WebProcess/WebPage/WebPage.cpp:
     16        (WebKit::WebPage::updatePreferences): Pass new preference along to WebCore
     17            Settings.
     18
    1192011-04-22  Brian Weinstein  <bweinstein@apple.com>
    220
  • trunk/Source/WebKit2/Shared/WebPreferencesStore.h

    r84561 r84648  
    7575    macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false) \
    7676    macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false) \
     77    macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true) \
    7778    \
    7879
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r83778 r84648  
    523523}
    524524
     525void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled)
     526{
     527    toImpl(preferencesRef)->setAVFoundationEnabled(enabled);
     528}
     529
     530bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef)
     531{
     532    return toImpl(preferencesRef)->isAVFoundationEnabled();
     533}
     534
    525535void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
    526536{
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h

    r83628 r84648  
    159159WK_EXPORT bool WKPreferencesGetFullScreenEnabled(WKPreferencesRef preferencesRef);
    160160
     161// Defaults to true.
     162WK_EXPORT void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled);
     163WK_EXPORT bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef);
    161164
    162165#ifdef __cplusplus
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r84613 r84648  
    14681468#endif
    14691469
     1470#if USE(AVFOUNDATION)
     1471    settings->setAVFoundationEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationEnabledKey()));
     1472#endif
     1473
    14701474    platformPreferencesDidChange(store);
    14711475}
Note: See TracChangeset for help on using the changeset viewer.