Changeset 81034 in webkit


Ignore:
Timestamp:
Mar 14, 2011 10:20:24 AM (13 years ago)
Author:
beidson@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=56296
Clean up IconDatabaseBase header.

Reviewed by Sam Weinig.

-Get rid of the "PlatformString.h" include and replace it with a forward declaration.
-Group methods by which are used in WebCore directly and which are used in WebKit ports.

This'll make it easier to use in external frameworks (like WebKit2).

  • loader/icon/IconDatabase.h:
  • loader/icon/IconDatabaseBase.h:

(WebCore::IconDatabaseBase::retainIconForPageURL):
(WebCore::IconDatabaseBase::releaseIconForPageURL):
(WebCore::IconDatabaseBase::iconForPageURL):
(WebCore::IconDatabaseBase::setIconURLForPageURL):
(WebCore::IconDatabaseBase::setIconDataForIconURL):
(WebCore::IconDatabaseBase::iconDataKnownForIconURL):
(WebCore::IconDatabaseBase::loadDecisionForIconURL):
(WebCore::IconDatabaseBase::importIconURLForPageURL):
(WebCore::IconDatabaseBase::importIconDataForIconURL):
(WebCore::IconDatabaseBase::open):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r81030 r81034  
     12011-03-14  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=56296
     6        Clean up IconDatabaseBase header.
     7
     8        -Get rid of the "PlatformString.h" include and replace it with a forward declaration.
     9        -Group methods by which are used in WebCore directly and which are used in WebKit ports.
     10
     11        This'll make it easier to use in external frameworks (like WebKit2).
     12
     13        * loader/icon/IconDatabase.h:
     14        * loader/icon/IconDatabaseBase.h:
     15        (WebCore::IconDatabaseBase::retainIconForPageURL):
     16        (WebCore::IconDatabaseBase::releaseIconForPageURL):
     17        (WebCore::IconDatabaseBase::iconForPageURL):
     18        (WebCore::IconDatabaseBase::setIconURLForPageURL):
     19        (WebCore::IconDatabaseBase::setIconDataForIconURL):
     20        (WebCore::IconDatabaseBase::iconDataKnownForIconURL):
     21        (WebCore::IconDatabaseBase::loadDecisionForIconURL):
     22        (WebCore::IconDatabaseBase::importIconURLForPageURL):
     23        (WebCore::IconDatabaseBase::importIconDataForIconURL):
     24        (WebCore::IconDatabaseBase::open):
     25
    1262011-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
    227
  • trunk/Source/WebCore/loader/icon/IconDatabase.h

    r80910 r81034  
    3535#include <wtf/OwnPtr.h>
    3636#include <wtf/text/StringHash.h>
     37#include <wtf/text/WTFString.h>
    3738
    3839#if ENABLE(ICONDATABASE)
  • trunk/Source/WebCore/loader/icon/IconDatabaseBase.h

    r80905 r81034  
    2727#define IconDatabaseBase_h
    2828
    29 #include "PlatformString.h"
     29#include <wtf/Forward.h>
     30#include <wtf/Noncopyable.h>
     31#include <wtf/PassRefPtr.h>
    3032
    31 #include <wtf/Noncopyable.h>
    3233
    3334namespace WebCore {
     
    3738class Image;
    3839class IntSize;
     40class SharedBuffer;
    3941
    4042enum IconLoadDecision {
     
    5355    virtual ~IconDatabaseBase() { }
    5456
    55     virtual void setEnabled(bool) { }
     57    // Used internally by WebCore
    5658    virtual bool isEnabled() const { return false; }
     59   
     60    virtual Image* iconForPageURL(const String&, const IntSize&) { return 0; }
    5761    virtual Image* defaultIcon(const IntSize&) { return 0; }
    58 
     62   
    5963    virtual void retainIconForPageURL(const String&) { }
    6064    virtual void releaseIconForPageURL(const String&) { }
    6165
    62     virtual Image* iconForPageURL(const String&, const IntSize&) { return 0; }
    6366    virtual String iconURLForPageURL(const String&);
    64     virtual void setIconURLForPageURL(const String&, const String&) { }
    65 
    66     virtual void setIconDataForIconURL(PassRefPtr<SharedBuffer>, const String&) { }
    6767    virtual bool iconDataKnownForIconURL(const String&) { return false; }
    6868    virtual IconLoadDecision loadDecisionForIconURL(const String&, DocumentLoader*) { return IconLoadNo; }
     69   
     70    virtual void setIconURLForPageURL(const String&, const String&) { }
     71    virtual void setIconDataForIconURL(PassRefPtr<SharedBuffer>, const String&) { }
    6972
    70     // Support for WebCoreStatistics in WebKit
     73    // Used within one or more WebKit ports.
     74    // We should try to remove these dependencies from the IconDatabaseBase class.
     75
     76    virtual void setEnabled(bool) { }
     77
    7178    virtual size_t pageURLMappingCount() { return 0; }
    7279    virtual size_t retainedPageURLCount() { return 0; }
Note: See TracChangeset for help on using the changeset viewer.