2011-04-20 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 21:02:48 +0000 (21:02 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 21:02:48 +0000 (21:02 +0000)
        Reviewed by Dan Bernstein.

        Adopt QTKit API for listing and deleting file in its media cache.
        <rdar://problem/9130029>
        https://bugs.webkit.org/show_bug.cgi?id=58795

        Not possible to test automatically, verified manually.

        * WebCore.exp.in: Export new media download cache functions.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Register cache management functions.
        (WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): New, return cache origins.
        (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): New, empty the media cache.
        (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): New, delete files in the media
            cache for one origin.

        * platform/mac/WebCoreSystemInterface.h: Add new WKSI functions.
        * platform/mac/WebCoreSystemInterface.mm: Ditto.

2011-04-20  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Dan Bernstein.

        Adopt QTKit API for listing and deleting file in its media cache.
        <rdar://problem/9130029>
        https://bugs.webkit.org/show_bug.cgi?id=58795

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLeopard.a:
        * libWebKitSystemInterfaceSnowLeopard.a:

2011-04-20  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Dan Bernstein.

        Adopt QTKit API for listing and deleting file in its media cache.
        <rdar://problem/9130029>

        * WebCoreSupport/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Initialize new functions.

2011-04-18  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Dan Bernstein.

        Adopt QTKit API for listing and deleting file in its media cache.
        <rdar://problem/9130029>

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Initialize new functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a

index b33f32f..d49e1f5 100644 (file)
@@ -1,3 +1,26 @@
+2011-04-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Adopt QTKit API for listing and deleting file in its media cache.
+        <rdar://problem/9130029> 
+        https://bugs.webkit.org/show_bug.cgi?id=58795
+
+        Not possible to test automatically, verified manually.
+
+        * WebCore.exp.in: Export new media download cache functions.
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Register cache management functions.
+        (WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): New, return cache origins.
+        (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): New, empty the media cache.
+        (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): New, delete files in the media
+            cache for one origin.
+
+        * platform/mac/WebCoreSystemInterface.h: Add new WKSI functions.
+        * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
 2011-04-20  Dirk Schulze  <krit@webkit.org>
 
         Reviewed by Simon Fraser.
index d8ee526..718f775 100644 (file)
@@ -1368,6 +1368,9 @@ _wkQTMovieMaxTimeSeekable
 _wkQTMovieSelectPreferredAlternates
 _wkQTMovieSetShowClosedCaptions
 _wkQTMovieViewSetDrawSynchronously
+_wkQTGetSitesInMediaDownloadCache
+_wkQTClearMediaDownloadCacheForSite
+_wkQTClearMediaDownloadCache
 _wkSetCFURLResponseMIMEType
 _wkSetCGFontRenderingMode
 _wkSetCONNECTProxyAuthorizationForStream
index 7bdc064..d276720 100644 (file)
@@ -76,6 +76,9 @@ private:
     static MediaPlayerPrivateInterface* create(MediaPlayer* player);
     static void getSupportedTypes(HashSet<String>& types);
     static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
+    static void getSitesInMediaCache(Vector<String>&);
+    static void clearMediaCache();
+    static void clearMediaCacheForSite(const String&);
     static bool isAvailable();
 
     PlatformMedia platformMedia() const;
index 400fdfb..a9ebc1a 100644 (file)
@@ -209,7 +209,7 @@ MediaPlayerPrivateInterface* MediaPlayerPrivateQTKit::create(MediaPlayer* player
 void MediaPlayerPrivateQTKit::registerMediaEngine(MediaEngineRegistrar registrar)
 {
     if (isAvailable())
-        registrar(create, getSupportedTypes, supportsType, 0, 0, 0);
+        registrar(create, getSupportedTypes, supportsType, getSitesInMediaCache, clearMediaCache, clearMediaCacheForSite);
 }
 
 MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit(MediaPlayer* player)
@@ -1490,7 +1490,24 @@ bool MediaPlayerPrivateQTKit::isAvailable()
     return QTKitLibrary();
 #endif
 }
-    
+
+void MediaPlayerPrivateQTKit::getSitesInMediaCache(Vector<String>& sites) 
+{
+    NSArray *mediaSites = wkQTGetSitesInMediaDownloadCache();
+    for (NSString *site in mediaSites)
+        sites.append(site);
+}
+
+void MediaPlayerPrivateQTKit::clearMediaCache()
+{
+    wkQTClearMediaDownloadCache();
+}
+
+void MediaPlayerPrivateQTKit::clearMediaCacheForSite(const String& site)
+{
+    wkQTClearMediaDownloadCacheForSite(site);
+}
+
 void MediaPlayerPrivateQTKit::disableUnsupportedTracks()
 {
     if (!m_qtMovie) {
@@ -1645,7 +1662,6 @@ void MediaPlayerPrivateQTKit::setPrivateBrowsingMode(bool privateBrowsing)
     [m_qtMovie.get() setAttribute:[NSNumber numberWithBool:!privateBrowsing] forKey:@"QTMovieAllowPersistentCacheAttribute"];
 }
 
-
 } // namespace WebCore
 
 @implementation WebCoreMovieObserver
index 3c9850b..a49a455 100644 (file)
@@ -141,6 +141,9 @@ extern BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*);
 extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
 extern void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
+extern NSArray *(*wkQTGetSitesInMediaDownloadCache)();
+extern void (*wkQTClearMediaDownloadCacheForSite)(NSString *site);
+extern void (*wkQTClearMediaDownloadCache)();
 extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 extern void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
index 6a78ff6..65ea130 100644 (file)
@@ -67,6 +67,10 @@ BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*);
 void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
 void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
+NSArray *(*wkQTGetSitesInMediaDownloadCache)();
+void (*wkQTClearMediaDownloadCacheForSite)(NSString *site);
+void (*wkQTClearMediaDownloadCache)();
+
 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 void (*wkSetDragImage)(NSImage*, NSPoint offset);
index 5139734..d52dead 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Adopt QTKit API for listing and deleting file in its media cache.
+        <rdar://problem/9130029> 
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Initialize new functions.
+
 2011-04-19  Matthew Delaney  <mdelaney@apple.com>
 
         Reviewed by Simon Fraser.
index de2a1f4..8bac25a 100644 (file)
@@ -99,6 +99,9 @@ void InitWebCoreSystemInterface(void)
     INIT(QTMovieSetShowClosedCaptions);
     INIT(QTMovieSelectPreferredAlternates);
     INIT(QTMovieViewSetDrawSynchronously);
+    INIT(QTGetSitesInMediaDownloadCache);
+    INIT(QTClearMediaDownloadCacheForSite);
+    INIT(QTClearMediaDownloadCache);
 
 #ifndef BUILDING_ON_TIGER
     INIT(GetGlyphsForCharacters);
index 743a4ed..0cd0167 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-18  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Adopt QTKit API for listing and deleting file in its media cache.
+        <rdar://problem/9130029> 
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Initialize new functions.
+
 2011-04-20  Alejandro G. Castro  <alex@igalia.com>
 
         Fixed GTK+ compilation after r84206.
index a4fbc09..78f7e90 100644 (file)
@@ -79,6 +79,9 @@ void InitWebCoreSystemInterface(void)
         INIT(QTMovieSelectPreferredAlternates);
         INIT(QTMovieSetShowClosedCaptions);
         INIT(QTMovieViewSetDrawSynchronously);
+        INIT(QTGetSitesInMediaDownloadCache);
+        INIT(QTClearMediaDownloadCacheForSite);
+        INIT(QTClearMediaDownloadCache);
         INIT(SetCGFontRenderingMode);
         INIT(SetCONNECTProxyAuthorizationForStream);
         INIT(SetCONNECTProxyForStream);
index 0fe2800..d480b69 100644 (file)
@@ -1,3 +1,15 @@
+2011-04-20  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Adopt QTKit API for listing and deleting file in its media cache.
+        <rdar://problem/9130029> 
+        https://bugs.webkit.org/show_bug.cgi?id=58795
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+
 2011-04-19  Jessie Berlin  <jberlin@apple.com>
 
         Reviewed by Sam Weinig.
index 9079919..b6457f9 100644 (file)
@@ -306,6 +306,10 @@ typedef enum {
     
 NSControl *WKCreateMediaUIControl(int controlType);
 
+NSArray *WKQTGetSitesInMediaDownloadCache();
+void WKQTClearMediaDownloadCacheForSite(NSString *site);
+void WKQTClearMediaDownloadCache();
+    
 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
 mach_port_t WKInitializeRenderServer(void);
     
@@ -456,6 +460,8 @@ void WKContentAreaResized(WKScrollbarPainterControllerRef);
 void WKWillEndLiveResize(WKScrollbarPainterControllerRef);
 void WKContentAreaDidShow(WKScrollbarPainterControllerRef);
 void WKContentAreaDidHide(WKScrollbarPainterControllerRef);
+void WKDidBeginScrollGesture(WKScrollbarPainterControllerRef);
+void WKDidEndScrollGesture(WKScrollbarPainterControllerRef);
 
 bool WKScrollbarPainterUsesOverlayScrollers(void);
 
index 6cd6976..8ceab77 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index e7e3872..9ff6e8e 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ