Home | History | Annotate | Download | only in C
      1 /*
      2  * Copyright (C) 2010 Apple Inc. All rights reserved.
      3  *
      4  * Redistribution and use in source and binary forms, with or without
      5  * modification, are permitted provided that the following conditions
      6  * are met:
      7  * 1. Redistributions of source code must retain the above copyright
      8  *    notice, this list of conditions and the following disclaimer.
      9  * 2. Redistributions in binary form must reproduce the above copyright
     10  *    notice, this list of conditions and the following disclaimer in the
     11  *    documentation and/or other materials provided with the distribution.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     23  * THE POSSIBILITY OF SUCH DAMAGE.
     24  */
     25 
     26 #include "config.h"
     27 #include "WKPreferences.h"
     28 #include "WKPreferencesPrivate.h"
     29 
     30 #include "WKAPICast.h"
     31 #include "WebPreferences.h"
     32 #include <WebCore/Settings.h>
     33 #include <wtf/PassRefPtr.h>
     34 #include <wtf/RefPtr.h>
     35 
     36 using namespace WebKit;
     37 
     38 WKTypeID WKPreferencesGetTypeID()
     39 {
     40     return toAPI(WebPreferences::APIType);
     41 }
     42 
     43 WKPreferencesRef WKPreferencesCreate()
     44 {
     45     RefPtr<WebPreferences> preferences = WebPreferences::create();
     46     return toAPI(preferences.release().leakRef());
     47 }
     48 
     49 WKPreferencesRef WKPreferencesCreateWithIdentifier(WKStringRef identifierRef)
     50 {
     51     RefPtr<WebPreferences> preferences = WebPreferences::create(toWTFString(identifierRef));
     52     return toAPI(preferences.release().releaseRef());
     53 }
     54 
     55 void WKPreferencesSetJavaScriptEnabled(WKPreferencesRef preferencesRef, bool javaScriptEnabled)
     56 {
     57     toImpl(preferencesRef)->setJavaScriptEnabled(javaScriptEnabled);
     58 }
     59 
     60 bool WKPreferencesGetJavaScriptEnabled(WKPreferencesRef preferencesRef)
     61 {
     62     return toImpl(preferencesRef)->javaScriptEnabled();
     63 }
     64 
     65 void WKPreferencesSetLoadsImagesAutomatically(WKPreferencesRef preferencesRef, bool loadsImagesAutomatically)
     66 {
     67     toImpl(preferencesRef)->setLoadsImagesAutomatically(loadsImagesAutomatically);
     68 }
     69 
     70 bool WKPreferencesGetLoadsImagesAutomatically(WKPreferencesRef preferencesRef)
     71 {
     72     return toImpl(preferencesRef)->loadsImagesAutomatically();
     73 }
     74 
     75 void WKPreferencesSetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef, bool loadsSiteIconsIgnoringImageLoadingPreference)
     76 {
     77     toImpl(preferencesRef)->setLoadsSiteIconsIgnoringImageLoadingPreference(loadsSiteIconsIgnoringImageLoadingPreference);
     78 }
     79 
     80 bool WKPreferencesGetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef)
     81 {
     82     return toImpl(preferencesRef)->loadsSiteIconsIgnoringImageLoadingPreference();
     83 }
     84 
     85 void WKPreferencesSetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef, bool offlineWebApplicationCacheEnabled)
     86 {
     87     toImpl(preferencesRef)->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
     88 }
     89 
     90 bool WKPreferencesGetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef)
     91 {
     92     return toImpl(preferencesRef)->offlineWebApplicationCacheEnabled();
     93 }
     94 
     95 void WKPreferencesSetLocalStorageEnabled(WKPreferencesRef preferencesRef, bool localStorageEnabled)
     96 {
     97     toImpl(preferencesRef)->setLocalStorageEnabled(localStorageEnabled);
     98 }
     99 
    100 bool WKPreferencesGetLocalStorageEnabled(WKPreferencesRef preferencesRef)
    101 {
    102     return toImpl(preferencesRef)->localStorageEnabled();
    103 }
    104 
    105 void WKPreferencesSetDatabasesEnabled(WKPreferencesRef preferencesRef, bool databasesEnabled)
    106 {
    107     toImpl(preferencesRef)->setDatabasesEnabled(databasesEnabled);
    108 }
    109 
    110 bool WKPreferencesGetDatabasesEnabled(WKPreferencesRef preferencesRef)
    111 {
    112     return toImpl(preferencesRef)->databasesEnabled();
    113 }
    114 
    115 void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferencesRef, bool xssAuditorEnabled)
    116 {
    117     toImpl(preferencesRef)->setXSSAuditorEnabled(xssAuditorEnabled);
    118 }
    119 
    120 bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferencesRef)
    121 {
    122     return toImpl(preferencesRef)->xssAuditorEnabled();
    123 }
    124 
    125 void WKPreferencesSetFrameFlatteningEnabled(WKPreferencesRef preferencesRef, bool frameFlatteningEnabled)
    126 {
    127     toImpl(preferencesRef)->setFrameFlatteningEnabled(frameFlatteningEnabled);
    128 }
    129 
    130 bool WKPreferencesGetFrameFlatteningEnabled(WKPreferencesRef preferencesRef)
    131 {
    132     return toImpl(preferencesRef)->frameFlatteningEnabled();
    133 }
    134 
    135 void WKPreferencesSetPluginsEnabled(WKPreferencesRef preferencesRef, bool pluginsEnabled)
    136 {
    137     toImpl(preferencesRef)->setPluginsEnabled(pluginsEnabled);
    138 }
    139 
    140 bool WKPreferencesGetPluginsEnabled(WKPreferencesRef preferencesRef)
    141 {
    142     return toImpl(preferencesRef)->pluginsEnabled();
    143 }
    144 
    145 void WKPreferencesSetJavaEnabled(WKPreferencesRef preferencesRef, bool javaEnabled)
    146 {
    147     toImpl(preferencesRef)->setJavaEnabled(javaEnabled);
    148 }
    149 
    150 bool WKPreferencesGetJavaEnabled(WKPreferencesRef preferencesRef)
    151 {
    152     return toImpl(preferencesRef)->javaEnabled();
    153 }
    154 
    155 void WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef, bool javaScriptCanOpenWindowsAutomatically)
    156 {
    157     toImpl(preferencesRef)->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically);
    158 }
    159 
    160 bool WKPreferencesGetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef)
    161 {
    162     return toImpl(preferencesRef)->javaScriptCanOpenWindowsAutomatically();
    163 }
    164 
    165 void WKPreferencesSetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef, bool hyperlinkAuditingEnabled)
    166 {
    167     toImpl(preferencesRef)->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
    168 }
    169 
    170 bool WKPreferencesGetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef)
    171 {
    172     return toImpl(preferencesRef)->hyperlinkAuditingEnabled();
    173 }
    174 
    175 void WKPreferencesSetStandardFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    176 {
    177     toImpl(preferencesRef)->setStandardFontFamily(toWTFString(family));
    178 }
    179 
    180 WKStringRef WKPreferencesCopyStandardFontFamily(WKPreferencesRef preferencesRef)
    181 {
    182     return toCopiedAPI(toImpl(preferencesRef)->standardFontFamily());
    183 }
    184 
    185 void WKPreferencesSetFixedFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    186 {
    187     toImpl(preferencesRef)->setFixedFontFamily(toWTFString(family));
    188 }
    189 
    190 WKStringRef WKPreferencesCopyFixedFontFamily(WKPreferencesRef preferencesRef)
    191 {
    192     return toCopiedAPI(toImpl(preferencesRef)->fixedFontFamily());
    193 }
    194 
    195 void WKPreferencesSetSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    196 {
    197     toImpl(preferencesRef)->setSerifFontFamily(toWTFString(family));
    198 }
    199 
    200 WKStringRef WKPreferencesCopySerifFontFamily(WKPreferencesRef preferencesRef)
    201 {
    202     return toCopiedAPI(toImpl(preferencesRef)->serifFontFamily());
    203 }
    204 
    205 void WKPreferencesSetSansSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    206 {
    207     toImpl(preferencesRef)->setSansSerifFontFamily(toWTFString(family));
    208 }
    209 
    210 WKStringRef WKPreferencesCopySansSerifFontFamily(WKPreferencesRef preferencesRef)
    211 {
    212     return toCopiedAPI(toImpl(preferencesRef)->sansSerifFontFamily());
    213 }
    214 
    215 void WKPreferencesSetCursiveFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    216 {
    217     toImpl(preferencesRef)->setCursiveFontFamily(toWTFString(family));
    218 }
    219 
    220 WKStringRef WKPreferencesCopyCursiveFontFamily(WKPreferencesRef preferencesRef)
    221 {
    222     return toCopiedAPI(toImpl(preferencesRef)->cursiveFontFamily());
    223 }
    224 
    225 void WKPreferencesSetFantasyFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    226 {
    227     toImpl(preferencesRef)->setFantasyFontFamily(toWTFString(family));
    228 }
    229 
    230 WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef)
    231 {
    232     return toCopiedAPI(toImpl(preferencesRef)->fantasyFontFamily());
    233 }
    234 
    235 void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size)
    236 {
    237     toImpl(preferencesRef)->setDefaultFontSize(size);
    238 }
    239 
    240 uint32_t WKPreferencesGetDefaultFontSize(WKPreferencesRef preferencesRef)
    241 {
    242     return toImpl(preferencesRef)->defaultFontSize();
    243 }
    244 
    245 void WKPreferencesSetDefaultFixedFontSize(WKPreferencesRef preferencesRef, uint32_t size)
    246 {
    247     toImpl(preferencesRef)->setDefaultFixedFontSize(size);
    248 }
    249 
    250 uint32_t WKPreferencesGetDefaultFixedFontSize(WKPreferencesRef preferencesRef)
    251 {
    252     return toImpl(preferencesRef)->defaultFixedFontSize();
    253 }
    254 
    255 void WKPreferencesSetMinimumFontSize(WKPreferencesRef preferencesRef, uint32_t size)
    256 {
    257     toImpl(preferencesRef)->setMinimumFontSize(size);
    258 }
    259 
    260 uint32_t WKPreferencesGetMinimumFontSize(WKPreferencesRef preferencesRef)
    261 {
    262     return toImpl(preferencesRef)->minimumFontSize();
    263 }
    264 
    265 void WKPreferencesSetEditableLinkBehavior(WKPreferencesRef preferencesRef, WKEditableLinkBehavior wkBehavior)
    266 {
    267     toImpl(preferencesRef)->setEditableLinkBehavior(toEditableLinkBehavior(wkBehavior));
    268 }
    269 
    270 WKEditableLinkBehavior WKPreferencesGetEditableLinkBehavior(WKPreferencesRef preferencesRef)
    271 {
    272     return toAPI(static_cast<WebCore::EditableLinkBehavior>(toImpl(preferencesRef)->editableLinkBehavior()));
    273 }
    274 
    275 void WKPreferencesSetDefaultTextEncodingName(WKPreferencesRef preferencesRef, WKStringRef name)
    276 {
    277     toImpl(preferencesRef)->setDefaultTextEncodingName(toWTFString(name));
    278 }
    279 
    280 WKStringRef WKPreferencesCopyDefaultTextEncodingName(WKPreferencesRef preferencesRef)
    281 {
    282     return toCopiedAPI(toImpl(preferencesRef)->defaultTextEncodingName());
    283 }
    284 
    285 void WKPreferencesSetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
    286 {
    287     toImpl(preferencesRef)->setPrivateBrowsingEnabled(enabled);
    288 }
    289 
    290 bool WKPreferencesGetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef)
    291 {
    292     return toImpl(preferencesRef)->privateBrowsingEnabled();
    293 }
    294 
    295 void WKPreferencesSetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef, bool enabled)
    296 {
    297     toImpl(preferencesRef)->setDeveloperExtrasEnabled(enabled);
    298 }
    299 
    300 bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef)
    301 {
    302     return toImpl(preferencesRef)->developerExtrasEnabled();
    303 }
    304 
    305 void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable)
    306 {
    307     toImpl(preferencesRef)->setTextAreasAreResizable(resizable);
    308 }
    309 
    310 bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef)
    311 {
    312     return toImpl(preferencesRef)->textAreasAreResizable();
    313 }
    314 
    315 void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef preferencesRef, WKFontSmoothingLevel wkLevel)
    316 {
    317     toImpl(preferencesRef)->setFontSmoothingLevel(toFontSmoothingLevel(wkLevel));
    318 }
    319 
    320 WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef preferencesRef)
    321 {
    322     return toAPI(static_cast<FontSmoothingLevel>(toImpl(preferencesRef)->fontSmoothingLevel()));
    323 }
    324 
    325 void WKPreferencesSetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef, bool flag)
    326 {
    327     toImpl(preferencesRef)->setAcceleratedDrawingEnabled(flag);
    328 }
    329 
    330 bool WKPreferencesGetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef)
    331 {
    332     return toImpl(preferencesRef)->acceleratedDrawingEnabled();
    333 }
    334 
    335 void WKPreferencesSetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef, bool flag)
    336 {
    337     toImpl(preferencesRef)->setCanvasUsesAcceleratedDrawing(flag);
    338 }
    339 
    340 bool WKPreferencesGetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef)
    341 {
    342     return toImpl(preferencesRef)->canvasUsesAcceleratedDrawing();
    343 }
    344 
    345 void WKPreferencesSetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef, bool flag)
    346 {
    347     toImpl(preferencesRef)->setAcceleratedCompositingEnabled(flag);
    348 }
    349 
    350 bool WKPreferencesGetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef)
    351 {
    352     return toImpl(preferencesRef)->acceleratedCompositingEnabled();
    353 }
    354 
    355 void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef preferencesRef, bool flag)
    356 {
    357     toImpl(preferencesRef)->setCompositingBordersVisible(flag);
    358 }
    359 
    360 bool WKPreferencesGetCompositingBordersVisible(WKPreferencesRef preferencesRef)
    361 {
    362     return toImpl(preferencesRef)->compositingBordersVisible();
    363 }
    364 
    365 void WKPreferencesSetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef, bool flag)
    366 {
    367     toImpl(preferencesRef)->setCompositingRepaintCountersVisible(flag);
    368 }
    369 
    370 bool WKPreferencesGetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef)
    371 {
    372     return toImpl(preferencesRef)->compositingRepaintCountersVisible();
    373 }
    374 
    375 void WKPreferencesSetWebGLEnabled(WKPreferencesRef preferencesRef, bool flag)
    376 {
    377     toImpl(preferencesRef)->setWebGLEnabled(flag);
    378 }
    379 
    380 bool WKPreferencesGetWebGLEnabled(WKPreferencesRef preferencesRef)
    381 {
    382     return toImpl(preferencesRef)->webGLEnabled();
    383 }
    384 
    385 void WKPreferencesSetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef, bool flag)
    386 {
    387     toImpl(preferencesRef)->setNeedsSiteSpecificQuirks(flag);
    388 }
    389 
    390 bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef)
    391 {
    392     return toImpl(preferencesRef)->needsSiteSpecificQuirks();
    393 }
    394 
    395 void WKPreferencesSetForceFTPDirectoryListings(WKPreferencesRef preferencesRef, bool flag)
    396 {
    397     toImpl(preferencesRef)->setForceFTPDirectoryListings(flag);
    398 }
    399 
    400 bool WKPreferencesGetForceFTPDirectoryListings(WKPreferencesRef preferencesRef)
    401 {
    402     return toImpl(preferencesRef)->forceFTPDirectoryListings();
    403 }
    404 
    405 void WKPreferencesSetFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef, WKStringRef pathRef)
    406 {
    407     toImpl(preferencesRef)->setFTPDirectoryTemplatePath(toWTFString(pathRef));
    408 }
    409 
    410 WKStringRef WKPreferencesCopyFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef)
    411 {
    412     return toCopiedAPI(toImpl(preferencesRef)->ftpDirectoryTemplatePath());
    413 }
    414 
    415 void WKPreferencesSetTabsToLinks(WKPreferencesRef preferencesRef, bool tabsToLinks)
    416 {
    417     toImpl(preferencesRef)->setTabsToLinks(tabsToLinks);
    418 }
    419 
    420 bool WKPreferencesGetTabsToLinks(WKPreferencesRef preferencesRef)
    421 {
    422     return toImpl(preferencesRef)->tabsToLinks();
    423 }
    424 
    425 void WKPreferencesSetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef, bool enabled)
    426 {
    427     toImpl(preferencesRef)->setDNSPrefetchingEnabled(enabled);
    428 }
    429 
    430 bool WKPreferencesGetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef)
    431 {
    432     return toImpl(preferencesRef)->dnsPrefetchingEnabled();
    433 }
    434 
    435 void WKPreferencesSetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef, bool enabled)
    436 {
    437     toImpl(preferencesRef)->setAuthorAndUserStylesEnabled(enabled);
    438 }
    439 
    440 bool WKPreferencesGetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef)
    441 {
    442     return toImpl(preferencesRef)->authorAndUserStylesEnabled();
    443 }
    444 
    445 void WKPreferencesSetShouldPrintBackgrounds(WKPreferencesRef preferencesRef, bool flag)
    446 {
    447     toImpl(preferencesRef)->setShouldPrintBackgrounds(flag);
    448 }
    449 
    450 bool WKPreferencesGetShouldPrintBackgrounds(WKPreferencesRef preferencesRef)
    451 {
    452     return toImpl(preferencesRef)->shouldPrintBackgrounds();
    453 }
    454 
    455 void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
    456 {
    457     toImpl(preferencesRef)->setWebArchiveDebugModeEnabled(enabled);
    458 }
    459 
    460 bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
    461 {
    462     return toImpl(preferencesRef)->webArchiveDebugModeEnabled();
    463 }
    464 
    465 void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef, bool enabled)
    466 {
    467     toImpl(preferencesRef)->setLocalFileContentSniffingEnabled(enabled);
    468 }
    469 
    470 bool WKPreferencesGetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef)
    471 {
    472     return toImpl(preferencesRef)->localFileContentSniffingEnabled();
    473 }
    474 
    475 void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferencesRef, bool enabled)
    476 {
    477     toImpl(preferencesRef)->setUsesPageCache(enabled);
    478 }
    479 
    480 bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferencesRef)
    481 {
    482     return toImpl(preferencesRef)->usesPageCache();
    483 }
    484 
    485 void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef, bool enabled)
    486 {
    487     toImpl(preferencesRef)->setPaginateDuringLayoutEnabled(enabled);
    488 }
    489 
    490 bool WKPreferencesGetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef)
    491 {
    492     return toImpl(preferencesRef)->paginateDuringLayoutEnabled();
    493 }
    494 
    495 void WKPreferencesSetDOMPasteAllowed(WKPreferencesRef preferencesRef, bool enabled)
    496 {
    497     toImpl(preferencesRef)->setDOMPasteAllowed(enabled);
    498 }
    499 
    500 bool WKPreferencesGetDOMPasteAllowed(WKPreferencesRef preferencesRef)
    501 {
    502     return toImpl(preferencesRef)->domPasteAllowed();
    503 }
    504 
    505 void WKPreferencesSetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef, bool enabled)
    506 {
    507     toImpl(preferencesRef)->setJavaScriptCanAccessClipboard(enabled);
    508 }
    509 
    510 bool WKPreferencesGetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef)
    511 {
    512     return toImpl(preferencesRef)->javaScriptCanAccessClipboard();
    513 }
    514 
    515 void WKPreferencesSetFullScreenEnabled(WKPreferencesRef preferencesRef, bool enabled)
    516 {
    517     toImpl(preferencesRef)->setFullScreenEnabled(enabled);
    518 }
    519 
    520 bool WKPreferencesGetFullScreenEnabled(WKPreferencesRef preferencesRef)
    521 {
    522     return toImpl(preferencesRef)->fullScreenEnabled();
    523 }
    524 
    525 void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
    526 {
    527     toImpl(preferencesRef)->setWebSecurityEnabled(enabled);
    528 }
    529 
    530 bool WKPreferencesGetWebSecurityEnabled(WKPreferencesRef preferencesRef)
    531 {
    532     return toImpl(preferencesRef)->webSecurityEnabled();
    533 }
    534 
    535 void WKPreferencesSetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
    536 {
    537     toImpl(preferencesRef)->setAllowUniversalAccessFromFileURLs(allowed);
    538 }
    539 
    540 bool WKPreferencesGetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
    541 {
    542     return toImpl(preferencesRef)->allowUniversalAccessFromFileURLs();
    543 }
    544 
    545 void WKPreferencesSetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
    546 {
    547     toImpl(preferencesRef)->setAllowFileAccessFromFileURLs(allowed);
    548 }
    549 
    550 bool WKPreferencesGetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
    551 {
    552     return toImpl(preferencesRef)->allowFileAccessFromFileURLs();
    553 }
    554