WebPreferences.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. /*
  2. * Copyright (C) 2006, 2007, 2008, 2009 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 COMPUTER, INC. ``AS IS'' AND ANY
  14. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  15. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  16. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
  17. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  18. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  19. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  20. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  21. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  23. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef WebPreferences_H
  26. #define WebPreferences_H
  27. #include "WebKit.h"
  28. #include <CoreFoundation/CoreFoundation.h>
  29. #include <WebCore/BString.h>
  30. #include <wtf/RetainPtr.h>
  31. class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate {
  32. public:
  33. static WebPreferences* createInstance();
  34. protected:
  35. WebPreferences();
  36. ~WebPreferences();
  37. public:
  38. // IUnknown
  39. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
  40. virtual ULONG STDMETHODCALLTYPE AddRef(void);
  41. virtual ULONG STDMETHODCALLTYPE Release(void);
  42. // IWebPreferences
  43. virtual HRESULT STDMETHODCALLTYPE standardPreferences(
  44. /* [retval][out] */ IWebPreferences** standardPreferences);
  45. virtual HRESULT STDMETHODCALLTYPE initWithIdentifier(
  46. /* [in] */ BSTR anIdentifier,
  47. /* [retval][out] */ IWebPreferences** preferences);
  48. virtual HRESULT STDMETHODCALLTYPE identifier(
  49. /* [retval][out] */ BSTR* ident);
  50. virtual HRESULT STDMETHODCALLTYPE standardFontFamily(
  51. /* [retval][out] */ BSTR* family);
  52. virtual HRESULT STDMETHODCALLTYPE setStandardFontFamily(
  53. /* [in] */ BSTR family);
  54. virtual HRESULT STDMETHODCALLTYPE fixedFontFamily(
  55. /* [retval][out] */ BSTR* family);
  56. virtual HRESULT STDMETHODCALLTYPE setFixedFontFamily(
  57. /* [in] */ BSTR family);
  58. virtual HRESULT STDMETHODCALLTYPE serifFontFamily(
  59. /* [retval][out] */ BSTR* fontFamily);
  60. virtual HRESULT STDMETHODCALLTYPE setSerifFontFamily(
  61. /* [in] */ BSTR family);
  62. virtual HRESULT STDMETHODCALLTYPE sansSerifFontFamily(
  63. /* [retval][out] */ BSTR* family);
  64. virtual HRESULT STDMETHODCALLTYPE setSansSerifFontFamily(
  65. /* [in] */ BSTR family);
  66. virtual HRESULT STDMETHODCALLTYPE cursiveFontFamily(
  67. /* [retval][out] */ BSTR* family);
  68. virtual HRESULT STDMETHODCALLTYPE setCursiveFontFamily(
  69. /* [in] */ BSTR family);
  70. virtual HRESULT STDMETHODCALLTYPE fantasyFontFamily(
  71. /* [retval][out] */ BSTR* family);
  72. virtual HRESULT STDMETHODCALLTYPE setFantasyFontFamily(
  73. /* [in] */ BSTR family);
  74. virtual HRESULT STDMETHODCALLTYPE pictographFontFamily(
  75. /* [retval][out] */ BSTR* family);
  76. virtual HRESULT STDMETHODCALLTYPE setPictographFontFamily(
  77. /* [in] */ BSTR family);
  78. virtual HRESULT STDMETHODCALLTYPE defaultFontSize(
  79. /* [retval][out] */ int* fontSize);
  80. virtual HRESULT STDMETHODCALLTYPE setDefaultFontSize(
  81. /* [in] */ int fontSize);
  82. virtual HRESULT STDMETHODCALLTYPE defaultFixedFontSize(
  83. /* [retval][out] */ int* fontSize);
  84. virtual HRESULT STDMETHODCALLTYPE setDefaultFixedFontSize(
  85. /* [in] */ int fontSize);
  86. virtual HRESULT STDMETHODCALLTYPE minimumFontSize(
  87. /* [retval][out] */ int* fontSize);
  88. virtual HRESULT STDMETHODCALLTYPE setMinimumFontSize(
  89. /* [in] */ int fontSize);
  90. virtual HRESULT STDMETHODCALLTYPE minimumLogicalFontSize(
  91. /* [retval][out] */ int* fontSize);
  92. virtual HRESULT STDMETHODCALLTYPE setMinimumLogicalFontSize(
  93. /* [in] */ int fontSize);
  94. virtual HRESULT STDMETHODCALLTYPE defaultTextEncodingName(
  95. /* [retval][out] */ BSTR* name);
  96. virtual HRESULT STDMETHODCALLTYPE setDefaultTextEncodingName(
  97. /* [in] */ BSTR name);
  98. virtual HRESULT STDMETHODCALLTYPE userStyleSheetEnabled(
  99. /* [retval][out] */ BOOL* enabled);
  100. virtual HRESULT STDMETHODCALLTYPE setUserStyleSheetEnabled(
  101. /* [in] */ BOOL enabled);
  102. virtual HRESULT STDMETHODCALLTYPE userStyleSheetLocation(
  103. /* [retval][out] */ BSTR* location);
  104. virtual HRESULT STDMETHODCALLTYPE setUserStyleSheetLocation(
  105. /* [in] */ BSTR location);
  106. virtual HRESULT STDMETHODCALLTYPE isJavaEnabled(
  107. /* [retval][out] */ BOOL* enabled);
  108. virtual HRESULT STDMETHODCALLTYPE setJavaEnabled(
  109. /* [in] */ BOOL enabled);
  110. virtual HRESULT STDMETHODCALLTYPE isJavaScriptEnabled(
  111. /* [retval][out] */ BOOL* enabled);
  112. virtual HRESULT STDMETHODCALLTYPE setJavaScriptEnabled(
  113. /* [in] */ BOOL enabled);
  114. virtual HRESULT STDMETHODCALLTYPE javaScriptCanOpenWindowsAutomatically(
  115. /* [retval][out] */ BOOL* enabled);
  116. virtual HRESULT STDMETHODCALLTYPE setJavaScriptCanOpenWindowsAutomatically(
  117. /* [in] */ BOOL enabled);
  118. virtual HRESULT STDMETHODCALLTYPE arePlugInsEnabled(
  119. /* [retval][out] */ BOOL* enabled);
  120. virtual HRESULT STDMETHODCALLTYPE setPlugInsEnabled(
  121. /* [in] */ BOOL enabled);
  122. virtual HRESULT STDMETHODCALLTYPE isCSSRegionsEnabled(
  123. /* [retval][out] */ BOOL* enabled);
  124. virtual HRESULT STDMETHODCALLTYPE setCSSRegionsEnabled(
  125. /* [in] */ BOOL);
  126. virtual HRESULT STDMETHODCALLTYPE areSeamlessIFramesEnabled(
  127. /* [retval][out] */ BOOL* enabled);
  128. virtual HRESULT STDMETHODCALLTYPE setSeamlessIFramesEnabled(
  129. /* [in] */ BOOL);
  130. virtual HRESULT STDMETHODCALLTYPE allowsAnimatedImages(
  131. /* [retval][out] */ BOOL* enabled);
  132. virtual HRESULT STDMETHODCALLTYPE setAllowsAnimatedImages(
  133. /* [in] */ BOOL enabled);
  134. virtual HRESULT STDMETHODCALLTYPE allowAnimatedImageLooping(
  135. /* [retval][out] */ BOOL* enabled);
  136. virtual HRESULT STDMETHODCALLTYPE setAllowAnimatedImageLooping(
  137. /* [in] */ BOOL enabled);
  138. virtual HRESULT STDMETHODCALLTYPE setLoadsImagesAutomatically(
  139. /* [in] */ BOOL enabled);
  140. virtual HRESULT STDMETHODCALLTYPE loadsImagesAutomatically(
  141. /* [retval][out] */ BOOL* enabled);
  142. virtual HRESULT STDMETHODCALLTYPE setAutosaves(
  143. /* [in] */ BOOL enabled);
  144. virtual HRESULT STDMETHODCALLTYPE autosaves(
  145. /* [retval][out] */ BOOL* enabled);
  146. virtual HRESULT STDMETHODCALLTYPE setShouldPrintBackgrounds(
  147. /* [in] */ BOOL enabled);
  148. virtual HRESULT STDMETHODCALLTYPE shouldPrintBackgrounds(
  149. /* [retval][out] */ BOOL* enabled);
  150. virtual HRESULT STDMETHODCALLTYPE setPrivateBrowsingEnabled(
  151. /* [in] */ BOOL enabled);
  152. virtual HRESULT STDMETHODCALLTYPE privateBrowsingEnabled(
  153. /* [retval][out] */ BOOL* enabled);
  154. virtual HRESULT STDMETHODCALLTYPE setTabsToLinks(
  155. /* [in] */ BOOL enabled);
  156. virtual HRESULT STDMETHODCALLTYPE tabsToLinks(
  157. /* [retval][out] */ BOOL* enabled);
  158. virtual HRESULT STDMETHODCALLTYPE textAreasAreResizable(
  159. /* [retval][out] */ BOOL *enabled);
  160. virtual HRESULT STDMETHODCALLTYPE setTextAreasAreResizable(
  161. /* [in] */ BOOL enabled);
  162. virtual HRESULT STDMETHODCALLTYPE usesPageCache(
  163. /* [retval][out] */ BOOL *usesPageCache);
  164. virtual HRESULT STDMETHODCALLTYPE setUsesPageCache(
  165. /* [in] */ BOOL usesPageCache);
  166. virtual HRESULT STDMETHODCALLTYPE unused1();
  167. virtual HRESULT STDMETHODCALLTYPE unused2();
  168. virtual HRESULT STDMETHODCALLTYPE iconDatabaseLocation(
  169. /* [retval][out] */ BSTR* location);
  170. virtual HRESULT STDMETHODCALLTYPE setIconDatabaseLocation(
  171. /* [in] */ BSTR location);
  172. virtual HRESULT STDMETHODCALLTYPE iconDatabaseEnabled(
  173. /* [retval][out] */ BOOL* enabled);
  174. virtual HRESULT STDMETHODCALLTYPE setIconDatabaseEnabled(
  175. /* [in] */ BOOL enabled);
  176. virtual HRESULT STDMETHODCALLTYPE fontSmoothing(
  177. /* [retval][out] */ FontSmoothingType* smoothingType);
  178. virtual HRESULT STDMETHODCALLTYPE setFontSmoothing(
  179. /* [in] */ FontSmoothingType smoothingType);
  180. virtual HRESULT STDMETHODCALLTYPE editableLinkBehavior(
  181. /* [retval][out] */ WebKitEditableLinkBehavior* behavior);
  182. virtual HRESULT STDMETHODCALLTYPE setEditableLinkBehavior(
  183. /* [in] */ WebKitEditableLinkBehavior behavior);
  184. virtual HRESULT STDMETHODCALLTYPE unused5();
  185. virtual HRESULT STDMETHODCALLTYPE unused6();
  186. virtual HRESULT STDMETHODCALLTYPE cookieStorageAcceptPolicy(
  187. /* [retval][out] */ WebKitCookieStorageAcceptPolicy *acceptPolicy);
  188. virtual HRESULT STDMETHODCALLTYPE setCookieStorageAcceptPolicy(
  189. /* [in] */ WebKitCookieStorageAcceptPolicy acceptPolicy);
  190. virtual HRESULT STDMETHODCALLTYPE continuousSpellCheckingEnabled(
  191. /* [retval][out] */ BOOL *enabled);
  192. virtual HRESULT STDMETHODCALLTYPE setContinuousSpellCheckingEnabled(
  193. /* [in] */ BOOL enabled);
  194. virtual HRESULT STDMETHODCALLTYPE grammarCheckingEnabled(
  195. /* [retval][out] */ BOOL *enabled);
  196. virtual HRESULT STDMETHODCALLTYPE setGrammarCheckingEnabled(
  197. /* [in] */ BOOL enabled);
  198. virtual HRESULT STDMETHODCALLTYPE allowContinuousSpellChecking(
  199. /* [retval][out] */ BOOL *enabled);
  200. virtual HRESULT STDMETHODCALLTYPE setAllowContinuousSpellChecking(
  201. /* [in] */ BOOL enabled);
  202. virtual HRESULT STDMETHODCALLTYPE isDOMPasteAllowed(
  203. /* [retval][out] */ BOOL *enabled);
  204. virtual HRESULT STDMETHODCALLTYPE setDOMPasteAllowed(
  205. /* [in] */ BOOL enabled);
  206. virtual HRESULT STDMETHODCALLTYPE cacheModel(
  207. /* [retval][out] */ WebCacheModel* cacheModel);
  208. virtual HRESULT STDMETHODCALLTYPE setCacheModel(
  209. /* [in] */ WebCacheModel cacheModel);
  210. virtual HRESULT STDMETHODCALLTYPE unused3();
  211. virtual HRESULT STDMETHODCALLTYPE unused4();
  212. virtual HRESULT STDMETHODCALLTYPE setAVFoundationEnabled(
  213. /* [in] */ BOOL);
  214. virtual HRESULT STDMETHODCALLTYPE avFoundationEnabled(
  215. /* [retval][out] */ BOOL*);
  216. virtual HRESULT STDMETHODCALLTYPE setShouldDisplaySubtitles(
  217. /* [in] */ BOOL);
  218. virtual HRESULT STDMETHODCALLTYPE shouldDisplaySubtitles(
  219. /* [retval][out] */ BOOL*);
  220. virtual HRESULT STDMETHODCALLTYPE setShouldDisplayCaptions(
  221. /* [in] */ BOOL);
  222. virtual HRESULT STDMETHODCALLTYPE shouldDisplayCaptions(
  223. /* [retval][out] */ BOOL*);
  224. virtual HRESULT STDMETHODCALLTYPE setShouldDisplayTextDescriptions(
  225. /* [in] */ BOOL);
  226. virtual HRESULT STDMETHODCALLTYPE shouldDisplayTextDescriptions(
  227. /* [retval][out] */ BOOL*);
  228. // IWebPreferencesPrivate
  229. virtual HRESULT STDMETHODCALLTYPE setDeveloperExtrasEnabled(
  230. /* [in] */ BOOL);
  231. virtual HRESULT STDMETHODCALLTYPE developerExtrasEnabled(
  232. /* [retval][out] */ BOOL*);
  233. virtual HRESULT STDMETHODCALLTYPE setAutomaticallyDetectsCacheModel(
  234. /* [in] */ BOOL automaticallyDetectsCacheModel);
  235. virtual HRESULT STDMETHODCALLTYPE automaticallyDetectsCacheModel(
  236. /* [out, retval] */ BOOL* automaticallyDetectsCacheModel);
  237. virtual HRESULT STDMETHODCALLTYPE setAuthorAndUserStylesEnabled(BOOL);
  238. virtual HRESULT STDMETHODCALLTYPE authorAndUserStylesEnabled(BOOL*);
  239. virtual HRESULT STDMETHODCALLTYPE inApplicationChromeMode(
  240. /* [retval][out] */ BOOL *enabled);
  241. virtual HRESULT STDMETHODCALLTYPE setApplicationChromeMode(
  242. /* [in] */ BOOL enabled);
  243. virtual HRESULT STDMETHODCALLTYPE setOfflineWebApplicationCacheEnabled(
  244. /* [in] */ BOOL enabled);
  245. virtual HRESULT STDMETHODCALLTYPE offlineWebApplicationCacheEnabled(
  246. /* [retval][out] */ BOOL *enabled);
  247. virtual HRESULT STDMETHODCALLTYPE setDatabasesEnabled(
  248. /* [in] */ BOOL enabled);
  249. virtual HRESULT STDMETHODCALLTYPE databasesEnabled(
  250. /* [retval][out] */ BOOL *enabled);
  251. virtual HRESULT STDMETHODCALLTYPE setLocalStorageEnabled(
  252. /* [in] */ BOOL enabled);
  253. virtual HRESULT STDMETHODCALLTYPE localStorageEnabled(
  254. /* [retval][out] */ BOOL *enabled);
  255. virtual HRESULT STDMETHODCALLTYPE localStorageDatabasePath(
  256. /* [out, retval] */ BSTR* location);
  257. virtual HRESULT STDMETHODCALLTYPE setLocalStorageDatabasePath(
  258. /* [in] */ BSTR location);
  259. virtual HRESULT STDMETHODCALLTYPE experimentalNotificationsEnabled(
  260. /* [retval][out] */ BOOL *enabled);
  261. virtual HRESULT STDMETHODCALLTYPE setExperimentalNotificationsEnabled(
  262. /* [in] */ BOOL enabled);
  263. virtual HRESULT STDMETHODCALLTYPE setShouldPaintNativeControls(
  264. /* [in] */ BOOL shouldPaint);
  265. virtual HRESULT STDMETHODCALLTYPE shouldPaintNativeControls(
  266. /* [retval][out] */ BOOL *shouldPaint);
  267. virtual HRESULT STDMETHODCALLTYPE setZoomsTextOnly(
  268. /* [retval][out] */ BOOL zoomsTextOnly);
  269. virtual HRESULT STDMETHODCALLTYPE zoomsTextOnly(
  270. /* [retval][out] */ BOOL *zoomsTextOnly);
  271. virtual HRESULT STDMETHODCALLTYPE fontSmoothingContrast(
  272. /* [retval][out] */ float* contrast);
  273. virtual HRESULT STDMETHODCALLTYPE setFontSmoothingContrast(
  274. /* [in] */ float contrast);
  275. virtual HRESULT STDMETHODCALLTYPE isWebSecurityEnabled(
  276. /* [retval][out] */ BOOL* enabled);
  277. virtual HRESULT STDMETHODCALLTYPE setWebSecurityEnabled(
  278. /* [in] */ BOOL enabled);
  279. virtual HRESULT STDMETHODCALLTYPE allowUniversalAccessFromFileURLs(
  280. /* [retval][out] */ BOOL* allowAccess);
  281. virtual HRESULT STDMETHODCALLTYPE setAllowUniversalAccessFromFileURLs(
  282. /* [in] */ BOOL allowAccess);
  283. virtual HRESULT STDMETHODCALLTYPE allowFileAccessFromFileURLs(
  284. /* [retval][out] */ BOOL* allowAccess);
  285. virtual HRESULT STDMETHODCALLTYPE setAllowFileAccessFromFileURLs(
  286. /* [in] */ BOOL allowAccess);
  287. virtual HRESULT STDMETHODCALLTYPE javaScriptCanAccessClipboard(
  288. /* [retval][out] */ BOOL* enabled);
  289. virtual HRESULT STDMETHODCALLTYPE setJavaScriptCanAccessClipboard(
  290. /* [in] */ BOOL enabled);
  291. virtual HRESULT STDMETHODCALLTYPE isXSSAuditorEnabled(
  292. /* [retval][out] */ BOOL* enabled);
  293. virtual HRESULT STDMETHODCALLTYPE setXSSAuditorEnabled(
  294. /* [in] */ BOOL enabled);
  295. virtual HRESULT STDMETHODCALLTYPE setShouldUseHighResolutionTimers(
  296. /* [in] */ BOOL useHighResolutionTimers);
  297. virtual HRESULT STDMETHODCALLTYPE shouldUseHighResolutionTimers(
  298. /* [retval][out] */ BOOL* useHighResolutionTimers);
  299. virtual HRESULT STDMETHODCALLTYPE isFrameFlatteningEnabled(
  300. /* [retval][out] */ BOOL* enabled);
  301. virtual HRESULT STDMETHODCALLTYPE setFrameFlatteningEnabled(
  302. /* [in] */ BOOL enabled);
  303. virtual HRESULT STDMETHODCALLTYPE setPreferenceForTest(
  304. /* [in] */ BSTR key,
  305. /* [in] */ BSTR value);
  306. virtual HRESULT STDMETHODCALLTYPE setAcceleratedCompositingEnabled(BOOL);
  307. virtual HRESULT STDMETHODCALLTYPE acceleratedCompositingEnabled(BOOL*);
  308. virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL);
  309. virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*);
  310. virtual HRESULT STDMETHODCALLTYPE setShowDebugBorders(BOOL);
  311. virtual HRESULT STDMETHODCALLTYPE showDebugBorders(BOOL*);
  312. virtual HRESULT STDMETHODCALLTYPE setShowRepaintCounter(BOOL);
  313. virtual HRESULT STDMETHODCALLTYPE showRepaintCounter(BOOL*);
  314. virtual HRESULT STDMETHODCALLTYPE setDNSPrefetchingEnabled(BOOL);
  315. virtual HRESULT STDMETHODCALLTYPE isDNSPrefetchingEnabled(BOOL*);
  316. virtual HRESULT STDMETHODCALLTYPE hyperlinkAuditingEnabled(BOOL*);
  317. virtual HRESULT STDMETHODCALLTYPE setHyperlinkAuditingEnabled(BOOL);
  318. virtual HRESULT STDMETHODCALLTYPE loadsSiteIconsIgnoringImageLoadingPreference(BOOL*);
  319. virtual HRESULT STDMETHODCALLTYPE setLoadsSiteIconsIgnoringImageLoadingPreference(BOOL);
  320. virtual HRESULT STDMETHODCALLTYPE setFullScreenEnabled(BOOL);
  321. virtual HRESULT STDMETHODCALLTYPE isFullScreenEnabled(BOOL*);
  322. virtual HRESULT STDMETHODCALLTYPE hixie76WebSocketProtocolEnabled(BOOL*);
  323. virtual HRESULT STDMETHODCALLTYPE setHixie76WebSocketProtocolEnabled(BOOL);
  324. virtual HRESULT STDMETHODCALLTYPE mediaPlaybackRequiresUserGesture(BOOL*);
  325. virtual HRESULT STDMETHODCALLTYPE setMediaPlaybackRequiresUserGesture(BOOL);
  326. virtual HRESULT STDMETHODCALLTYPE mediaPlaybackAllowsInline(BOOL*);
  327. virtual HRESULT STDMETHODCALLTYPE setMediaPlaybackAllowsInline(BOOL);
  328. virtual HRESULT STDMETHODCALLTYPE showsToolTipOverTruncatedText(BOOL*);
  329. virtual HRESULT STDMETHODCALLTYPE setShowsToolTipOverTruncatedText(BOOL);
  330. virtual HRESULT STDMETHODCALLTYPE shouldInvertColors(BOOL*);
  331. virtual HRESULT STDMETHODCALLTYPE setShouldInvertColors(BOOL);
  332. virtual HRESULT STDMETHODCALLTYPE requestAnimationFrameEnabled(BOOL*);
  333. virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL);
  334. // WebPreferences
  335. // This method accesses a different preference key than developerExtrasEnabled.
  336. // See <rdar://5343767> for the justification.
  337. bool developerExtrasDisabledByOverride();
  338. static BSTR webPreferencesChangedNotification();
  339. static BSTR webPreferencesRemovedNotification();
  340. static void setInstance(WebPreferences* instance, BSTR identifier);
  341. static void removeReferenceForIdentifier(BSTR identifier);
  342. static WebPreferences* sharedStandardPreferences();
  343. // From WebHistory.h
  344. HRESULT historyItemLimit(int* limit);
  345. HRESULT setHistoryItemLimit(int limit);
  346. HRESULT historyAgeInDaysLimit(int* limit);
  347. HRESULT setHistoryAgeInDaysLimit(int limit);
  348. void willAddToWebView();
  349. void didRemoveFromWebView();
  350. HRESULT postPreferencesChangesNotification();
  351. protected:
  352. void setValueForKey(CFStringRef key, CFPropertyListRef value);
  353. RetainPtr<CFPropertyListRef> valueForKey(CFStringRef key);
  354. BSTR stringValueForKey(CFStringRef key);
  355. int integerValueForKey(CFStringRef key);
  356. BOOL boolValueForKey(CFStringRef key);
  357. float floatValueForKey(CFStringRef key);
  358. LONGLONG longlongValueForKey(CFStringRef key);
  359. void setStringValue(CFStringRef key, LPCTSTR value);
  360. void setIntegerValue(CFStringRef key, int value);
  361. void setBoolValue(CFStringRef key, BOOL value);
  362. void setFloatValue(CFStringRef key, float value);
  363. void setLongLongValue(CFStringRef key, LONGLONG value);
  364. static WebPreferences* getInstanceForIdentifier(BSTR identifier);
  365. static void initializeDefaultSettings();
  366. void save();
  367. void load();
  368. void migrateWebKitPreferencesToCFPreferences();
  369. void copyWebKitPreferencesToCFPreferences(CFDictionaryRef);
  370. protected:
  371. ULONG m_refCount;
  372. RetainPtr<CFMutableDictionaryRef> m_privatePrefs;
  373. WebCore::BString m_identifier;
  374. bool m_autoSaves;
  375. bool m_automaticallyDetectsCacheModel;
  376. unsigned m_numWebViews;
  377. };
  378. #endif