diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/loader/icon | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/loader/icon')
-rw-r--r-- | WebCore/loader/icon/IconDatabase.cpp | 4 | ||||
-rw-r--r-- | WebCore/loader/icon/IconDatabase.h | 6 | ||||
-rw-r--r-- | WebCore/loader/icon/IconDatabaseNone.cpp | 21 | ||||
-rw-r--r-- | WebCore/loader/icon/IconLoader.h | 2 | ||||
-rw-r--r-- | WebCore/loader/icon/PageURLRecord.h | 2 | ||||
-rw-r--r-- | WebCore/loader/icon/wince/IconDatabaseWince.cpp | 81 |
6 files changed, 112 insertions, 4 deletions
diff --git a/WebCore/loader/icon/IconDatabase.cpp b/WebCore/loader/icon/IconDatabase.cpp index 1f49c88..a6c2a66 100644 --- a/WebCore/loader/icon/IconDatabase.cpp +++ b/WebCore/loader/icon/IconDatabase.cpp @@ -27,6 +27,8 @@ #include "config.h" #include "IconDatabase.h" +#if ENABLE(ICONDATABASE) + #include "AutodrainedPool.h" #include "DocumentLoader.h" #include "FileSystem.h" @@ -2080,3 +2082,5 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot) } } // namespace WebCore + +#endif // ENABLE(ICONDATABASE) diff --git a/WebCore/loader/icon/IconDatabase.h b/WebCore/loader/icon/IconDatabase.h index 40f641a..44ef22a 100644 --- a/WebCore/loader/icon/IconDatabase.h +++ b/WebCore/loader/icon/IconDatabase.h @@ -62,7 +62,7 @@ enum IconLoadDecision { IconLoadUnknown }; -class IconDatabase : Noncopyable { +class IconDatabase : public Noncopyable { // *** Main Thread Only *** public: @@ -165,6 +165,7 @@ private: HashSet<String> m_pageURLsPendingImport; HashSet<String> m_pageURLsInterestedInIcons; HashSet<IconRecord*> m_iconsPendingReading; +#endif // ENABLE(ICONDATABASE) // *** Sync Thread Only *** public: @@ -174,6 +175,7 @@ public: bool shouldStopThreadActivity() const; +#if ENABLE(ICONDATABASE) private: static void* iconDatabaseSyncThreadStart(void *); void* iconDatabaseSyncThread(); @@ -238,4 +240,4 @@ IconDatabase* iconDatabase(); } // namespace WebCore -#endif +#endif // IconDatabase_h diff --git a/WebCore/loader/icon/IconDatabaseNone.cpp b/WebCore/loader/icon/IconDatabaseNone.cpp index a7fb88d..03a7964 100644 --- a/WebCore/loader/icon/IconDatabaseNone.cpp +++ b/WebCore/loader/icon/IconDatabaseNone.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "IconDatabase.h" +#if !ENABLE(ICONDATABASE) + #include "PlatformString.h" #include "SharedBuffer.h" #include <wtf/StdLibExtras.h> @@ -194,4 +196,23 @@ void IconDatabase::setClient(IconDatabaseClient*) { } +// ************************ +// *** Sync Thread Only *** +// ************************ + +void IconDatabase::importIconURLForPageURL(const String&, const String&) +{ +} + +void IconDatabase::importIconDataForIconURL(PassRefPtr<SharedBuffer>, const String&) +{ +} + +bool IconDatabase::shouldStopThreadActivity() const +{ + return true; +} + } // namespace WebCore + +#endif // !ENABLE(ICONDATABASE) diff --git a/WebCore/loader/icon/IconLoader.h b/WebCore/loader/icon/IconLoader.h index a7194d8..7b96ed8 100644 --- a/WebCore/loader/icon/IconLoader.h +++ b/WebCore/loader/icon/IconLoader.h @@ -38,7 +38,7 @@ class Frame; class KURL; class SharedBuffer; -class IconLoader : private SubresourceLoaderClient, Noncopyable { +class IconLoader : private SubresourceLoaderClient, public Noncopyable { public: static std::auto_ptr<IconLoader> create(Frame*); ~IconLoader(); diff --git a/WebCore/loader/icon/PageURLRecord.h b/WebCore/loader/icon/PageURLRecord.h index bc52f5b..f7ccb8f 100644 --- a/WebCore/loader/icon/PageURLRecord.h +++ b/WebCore/loader/icon/PageURLRecord.h @@ -51,7 +51,7 @@ public: String iconURL; }; -class PageURLRecord : Noncopyable { +class PageURLRecord : public Noncopyable { public: PageURLRecord(const String& pageURL); ~PageURLRecord(); diff --git a/WebCore/loader/icon/wince/IconDatabaseWince.cpp b/WebCore/loader/icon/wince/IconDatabaseWince.cpp new file mode 100644 index 0000000..e6d686c --- /dev/null +++ b/WebCore/loader/icon/wince/IconDatabaseWince.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2007-2009 Torch Mobile Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" +#include "IconDatabase.h" + +#include "AutodrainedPool.h" +#include "CString.h" +#include "DocumentLoader.h" +#include "FileSystem.h" +#include "IconDatabaseClient.h" +#include "IconRecord.h" +#include "Image.h" + +namespace WebCore { + +// Function to obtain the global icon database. +IconDatabase* iconDatabase() { return 0; } + +IconDatabase::IconDatabase() {} +IconDatabase::~IconDatabase() {} + +void IconDatabase::setClient(IconDatabaseClient*) {} + +bool IconDatabase::open(const String& path) { return false; } +void IconDatabase::close() {} + +void IconDatabase::removeAllIcons() {} + +Image* IconDatabase::iconForPageURL(const String&, const IntSize&) { return 0; } +void IconDatabase::readIconForPageURLFromDisk(const String&) {} +String IconDatabase::iconURLForPageURL(const String&) { return String(); } +Image* IconDatabase::defaultIcon(const IntSize&) { return 0;} + +void IconDatabase::retainIconForPageURL(const String&) {} +void IconDatabase::releaseIconForPageURL(const String&) {} + +void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> data, const String&) {} +void IconDatabase::setIconURLForPageURL(const String& iconURL, const String& pageURL) {} + +IconLoadDecision IconDatabase::loadDecisionForIconURL(const String&, DocumentLoader*) { return IconLoadNo; } +bool IconDatabase::iconDataKnownForIconURL(const String&) { return false; } + +void IconDatabase::setEnabled(bool enabled) {} +bool IconDatabase::isEnabled() const { return false; } + +void IconDatabase::setPrivateBrowsingEnabled(bool flag) {} +bool IconDatabase::isPrivateBrowsingEnabled() const { return false; } + +void IconDatabase::delayDatabaseCleanup() {} +void IconDatabase::allowDatabaseCleanup() {} +void IconDatabase::checkIntegrityBeforeOpening() {} + +// Support for WebCoreStatistics in WebKit +size_t IconDatabase::pageURLMappingCount() { return 0; } +size_t IconDatabase::retainedPageURLCount() {return 0; } +size_t IconDatabase::iconRecordCount() { return 0; } +size_t IconDatabase::iconRecordCountWithData() { return 0; } + +bool IconDatabase::isOpen() const { return false; } +String IconDatabase::databasePath() const { return String(); } +String IconDatabase::defaultDatabaseFilename() { return String(); } + +} // namespace WebCore |