Changeset 83931 in webkit
- Timestamp:
- Apr 14, 2011 7:12:05 PM (13 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r83727 r83931 1 2011-04-14 Grzegorz Czajkowski <g.czajkowski@samsung.com> 2 3 Reviewed by Antonio Gomes. 4 5 Memory cache API 6 https://bugs.webkit.org/show_bug.cgi?id=58016 7 8 * ewk/ewk_settings.cpp: 9 (ewk_settings_cache_enable_get): 10 (ewk_settings_cache_enable_set): 11 (ewk_settings_cache_capacity_set): 12 * ewk/ewk_settings.h: 13 1 14 2011-04-13 Grzegorz Czajkowski <g.czajkowski@samsung.com> 2 15 -
trunk/Source/WebKit/efl/ewk/ewk_settings.cpp
r81824 r83931 30 30 #include "IntSize.h" 31 31 #include "KURL.h" 32 #include "MemoryCache.h" 32 33 #include "ewk_private.h" 33 34 … … 327 328 328 329 /** 330 * Gets status of the memory cache of WebCore. 331 * 332 * @return @c EINA_TRUE if the cache is enabled or @c EINA_FALSE if not 333 */ 334 Eina_Bool ewk_settings_cache_enable_get(void) 335 { 336 WebCore::MemoryCache* cache = WebCore::memoryCache(); 337 return !cache->disabled(); 338 } 339 340 /** 341 * Enables/disables the memory cache of WebCore, possibly clearing it. 342 * 343 * Disabling the cache will remove all resources from the cache. 344 * They may still live on if they are referenced by some Web page though. 345 * 346 * @param set @c EINA_TRUE to enable memory cache, @c EINA_FALSE to disable 347 */ 348 void ewk_settings_cache_enable_set(Eina_Bool set) 349 { 350 WebCore::MemoryCache* cache = WebCore::memoryCache(); 351 set = !set; 352 if (cache->disabled() != set) 353 cache->setDisabled(set); 354 } 355 356 /** 357 * Sets capacity of memory cache of WebCore. 358 * 359 * WebCore sets default value of memory cache on 8192 * 1024 bytes. 360 * 361 * @param capacity the maximum number of bytes that the cache should consume overall 362 */ 363 void ewk_settings_cache_capacity_set(unsigned capacity) 364 { 365 WebCore::MemoryCache* cache = WebCore::memoryCache(); 366 cache->setCapacities(0, capacity, capacity); 367 } 368 369 /** 329 370 * @internal 330 371 * -
trunk/Source/WebKit/efl/ewk/ewk_settings.h
r81658 r83931 55 55 EAPI const char* ewk_settings_proxy_uri_get(void); 56 56 57 EAPI Eina_Bool ewk_settings_cache_enable_get(void); 58 EAPI void ewk_settings_cache_enable_set(Eina_Bool set); 59 EAPI void ewk_settings_cache_capacity_set(unsigned capacity); 60 57 61 #ifdef __cplusplus 58 62 }
Note: See TracChangeset
for help on using the changeset viewer.