2011-01-21 Adam Klein <adamk@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 11:31:15 +0000 (11:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 11:31:15 +0000 (11:31 +0000)
        Reviewed by Eric Seidel.

        [chromium] Rename ChromiumBridge to PlatformBridge
        https://bugs.webkit.org/show_bug.cgi?id=52471

        No tests added as this is a rename; no change in behavior.

        * WebCore.gypi:
        * bindings/v8/V8DOMWindowShell.cpp:
        (WebCore::reportFatalErrorInV8):
        * page/PageGroup.cpp:
        (WebCore::PageGroup::isLinkVisited):
        * platform/android/PlatformBridge.h:
        * platform/audio/chromium/AudioBusChromium.cpp:
        (WebCore::createBusFromInMemoryAudioFile):
        * platform/chromium/ChromiumBridge.h: Removed.
        * platform/chromium/ChromiumDataObjectLegacy.cpp:
        (WebCore::ChromiumDataObjectLegacy::getData):
        * platform/chromium/DragDataChromium.cpp:
        (WebCore::DragData::asURL):
        * platform/chromium/FileSystemChromium.cpp:
        (WebCore::deleteFile):
        (WebCore::deleteEmptyDirectory):
        (WebCore::getFileSize):
        (WebCore::getFileModificationTime):
        (WebCore::revealFolderInOS):
        (WebCore::directoryName):
        (WebCore::pathByAppendingComponent):
        (WebCore::makeAllDirectories):
        (WebCore::fileExists):
        (WebCore::openFile):
        (WebCore::closeFile):
        (WebCore::seekFile):
        (WebCore::truncateFile):
        (WebCore::readFromFile):
        (WebCore::writeToFile):
        * platform/chromium/LanguageChromium.cpp:
        (WebCore::platformDefaultLanguage):
        * platform/chromium/LinkHashChromium.cpp:
        (WebCore::visitedLinkHash):
        * platform/chromium/MIMETypeRegistryChromium.cpp:
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
        * platform/chromium/PasteboardChromium.cpp:
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::writePlainText):
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeImage):
        (WebCore::Pasteboard::canSmartReplace):
        (WebCore::Pasteboard::plainText):
        (WebCore::Pasteboard::documentFragment):
        * platform/chromium/PlatformBridge.h:
        * platform/chromium/PlatformScreenChromium.cpp:
        (WebCore::screenDepth):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        * platform/chromium/ReadableDataObject.cpp:
        (WebCore::ReadableDataObject::getData):
        (WebCore::ReadableDataObject::urlTitle):
        (WebCore::ReadableDataObject::htmlBaseUrl):
        (WebCore::ReadableDataObject::filenames):
        (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
        * platform/chromium/SSLKeyGeneratorChromium.cpp:
        (WebCore::signedPublicKeyAndChallengeString):
        * platform/chromium/ScrollbarThemeChromium.cpp:
        * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
        (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
        (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
        (WebCore::ScrollbarThemeChromiumLinux::paintButton):
        (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
        (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
        (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
        * platform/chromium/ScrollbarThemeChromiumMac.mm:
        (WebCore::scrollbarStateToThemeState):
        (WebCore::ScrollbarThemeChromiumMac::paint):
        * platform/chromium/ScrollbarThemeChromiumWin.cpp:
        (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
        (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
        (WebCore::ScrollbarThemeChromiumWin::paintButton):
        (WebCore::ScrollbarThemeChromiumWin::paintThumb):
        (WebCore::ScrollbarThemeChromiumWin::buttonSize):
        * platform/chromium/SharedTimerChromium.cpp:
        (WebCore::setSharedTimerFiredFunction):
        (WebCore::setSharedTimerFireTime):
        (WebCore::stopSharedTimer):
        * platform/chromium/SuddenTerminationChromium.cpp:
        (WebCore::disableSuddenTermination):
        (WebCore::enableSuddenTermination):
        * platform/chromium/SystemTimeChromium.cpp:
        (WebCore::currentTime):
        * platform/chromium/WritableDataObject.cpp:
        (WebCore::WritableDataObject::setData):
        * platform/graphics/chromium/CrossProcessFontLoading.mm:
        * platform/graphics/chromium/FontCacheChromiumWin.cpp:
        (WebCore::fontContainsCharacter):
        (WebCore::FillLogFont):
        * platform/graphics/chromium/FontCacheLinux.cpp:
        (WebCore::FontCache::getFontDataForCharacters):
        * platform/graphics/chromium/FontChromiumWin.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
        (WebCore::FontPlatformData::scriptFontProperties):
        * platform/graphics/chromium/FontPlatformDataLinux.cpp:
        (WebCore::FontPlatformData::querySystemForRenderStyle):
        * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
        (WebCore::fillBMPGlyphs):
        * platform/graphics/chromium/ImageChromium.cpp:
        (WebCore::Image::loadPlatformResource):
        * platform/graphics/chromium/ImageChromiumMac.mm:
        (WebCore::Image::loadPlatformResource):
        * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
        (WebCore::SimpleFontData::platformInit):
        (WebCore::SimpleFontData::determinePitch):
        (WebCore::SimpleFontData::platformWidthForGlyph):
        * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
        (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
        * platform/graphics/skia/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData):
        * platform/network/chromium/CookieJarChromium.cpp:
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookieRequestHeaderFieldValue):
        (WebCore::cookiesEnabled):
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/chromium/DNSChromium.cpp:
        (WebCore::prefetchDNS):
        * platform/qt/PlatformBridge.h:
        * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
        (WebCore::SQLiteFileSystem::deleteDatabaseFile):
        (WebCore::SQLiteFileSystem::getDatabaseFileSize):
        * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
        (chromiumOpen):
        (chromiumDelete):
        (chromiumAccess):
        * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
        * plugins/chromium/PluginDataChromium.cpp:
        (WebCore::PluginCache::plugins):
        * rendering/RenderThemeChromiumMac.mm:
        (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
        * rendering/RenderThemeChromiumSkia.cpp:
        (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
        * rendering/RenderThemeChromiumWin.cpp:
        (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
        (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
        (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
        (WebCore::RenderThemeChromiumWin::systemColor):
        (WebCore::RenderThemeChromiumWin::paintButton):
        (WebCore::RenderThemeChromiumWin::paintSliderTrack):
        (WebCore::menuListButtonWidth):
        (WebCore::RenderThemeChromiumWin::paintMenuList):
        (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
        (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
        (WebCore::RenderThemeChromiumWin::paintProgressBar):
        * storage/chromium/IDBFactoryBackendInterface.cpp:
        (WebCore::IDBFactoryBackendInterface::create):
        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
        * storage/chromium/IDBKeyPathBackendImpl.cpp:
        (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2011-01-21  Adam Klein  <adamk@chromium.org>

        Reviewed by Eric Seidel.

        [chromium] Rename ChromiumBridge to PlatformBridge
        https://bugs.webkit.org/show_bug.cgi?id=52471

        * WebKit.gyp:
        * src/AssertMatchingEnums.cpp:
        * src/PlatformBridge.cpp:
        (WebCore::toChromeClientImpl):
        (WebCore::toWebWidgetClient):
        (WebCore::getCookieJar):
        (WebCore::PlatformBridge::cacheMetadata):
        (WebCore::PlatformBridge::clipboardIsFormatAvailable):
        (WebCore::PlatformBridge::clipboardReadPlainText):
        (WebCore::PlatformBridge::clipboardReadHTML):
        (WebCore::PlatformBridge::clipboardWriteSelection):
        (WebCore::PlatformBridge::clipboardWritePlainText):
        (WebCore::PlatformBridge::clipboardWriteURL):
        (WebCore::PlatformBridge::clipboardWriteImage):
        (WebCore::PlatformBridge::clipboardWriteData):
        (WebCore::PlatformBridge::clipboardReadAvailableTypes):
        (WebCore::PlatformBridge::clipboardReadData):
        (WebCore::PlatformBridge::clipboardReadFilenames):
        (WebCore::PlatformBridge::setCookies):
        (WebCore::PlatformBridge::cookies):
        (WebCore::PlatformBridge::cookieRequestHeaderFieldValue):
        (WebCore::PlatformBridge::rawCookies):
        (WebCore::PlatformBridge::deleteCookie):
        (WebCore::PlatformBridge::cookiesEnabled):
        (WebCore::PlatformBridge::prefetchDNS):
        (WebCore::PlatformBridge::fileExists):
        (WebCore::PlatformBridge::deleteFile):
        (WebCore::PlatformBridge::deleteEmptyDirectory):
        (WebCore::PlatformBridge::getFileSize):
        (WebCore::PlatformBridge::revealFolderInOS):
        (WebCore::PlatformBridge::getFileModificationTime):
        (WebCore::PlatformBridge::directoryName):
        (WebCore::PlatformBridge::pathByAppendingComponent):
        (WebCore::PlatformBridge::makeAllDirectories):
        (WebCore::PlatformBridge::getAbsolutePath):
        (WebCore::PlatformBridge::isDirectory):
        (WebCore::PlatformBridge::filePathToURL):
        (WebCore::PlatformBridge::openFile):
        (WebCore::PlatformBridge::closeFile):
        (WebCore::PlatformBridge::seekFile):
        (WebCore::PlatformBridge::truncateFile):
        (WebCore::PlatformBridge::readFromFile):
        (WebCore::PlatformBridge::writeToFile):
        (WebCore::PlatformBridge::ensureFontLoaded):
        (WebCore::PlatformBridge::getFontFamilyForCharacters):
        (WebCore::PlatformBridge::getRenderStyleForStrike):
        (WebCore::PlatformBridge::loadFont):
        (WebCore::PlatformBridge::databaseOpenFile):
        (WebCore::PlatformBridge::databaseDeleteFile):
        (WebCore::PlatformBridge::databaseGetFileAttributes):
        (WebCore::PlatformBridge::databaseGetFileSize):
        (WebCore::PlatformBridge::idbFactory):
        (WebCore::PlatformBridge::idbShutdown):
        (WebCore::PlatformBridge::createIDBKeysFromSerializedValuesAndKeyPath):
        (WebCore::PlatformBridge::signedPublicKeyAndChallengeString):
        (WebCore::PlatformBridge::computedDefaultLanguage):
        (WebCore::PlatformBridge::layoutTestMode):
        (WebCore::PlatformBridge::isSupportedImageMIMEType):
        (WebCore::PlatformBridge::isSupportedJavaScriptMIMEType):
        (WebCore::PlatformBridge::isSupportedNonImageMIMEType):
        (WebCore::PlatformBridge::mimeTypeForExtension):
        (WebCore::PlatformBridge::mimeTypeFromFile):
        (WebCore::PlatformBridge::preferredExtensionForMIMEType):
        (WebCore::PlatformBridge::plugins):
        (WebCore::PlatformBridge::pluginScriptableObject):
        (WebCore::PlatformBridge::loadPlatformImageResource):
        (WebCore::PlatformBridge::loadPlatformAudioResource):
        (WebCore::PlatformBridge::decodeAudioFileData):
        (WebCore::PlatformBridge::sandboxEnabled):
        (WebCore::PlatformBridge::setSharedTimerFiredFunction):
        (WebCore::PlatformBridge::setSharedTimerFireTime):
        (WebCore::PlatformBridge::stopSharedTimer):
        (WebCore::PlatformBridge::decrementStatsCounter):
        (WebCore::PlatformBridge::incrementStatsCounter):
        (WebCore::PlatformBridge::histogramCustomCounts):
        (WebCore::PlatformBridge::histogramEnumeration):
        (WebCore::PlatformBridge::suddenTerminationChanged):
        (WebCore::PlatformBridge::currentTime):
        (WebCore::PlatformBridge::paintButton):
        (WebCore::PlatformBridge::paintMenuList):
        (WebCore::PlatformBridge::paintScrollbarArrow):
        (WebCore::PlatformBridge::paintScrollbarThumb):
        (WebCore::PlatformBridge::paintScrollbarTrack):
        (WebCore::PlatformBridge::paintSpinButton):
        (WebCore::PlatformBridge::paintTextField):
        (WebCore::PlatformBridge::paintTrackbar):
        (WebCore::PlatformBridge::paintProgressBar):
        (WebCore::WebThemePart):
        (WebCore::WebThemeState):
        (WebCore::GetWebThemeExtraParams):
        (WebCore::PlatformBridge::getThemePartSize):
        (WebCore::PlatformBridge::paintThemePart):
        (WebCore::PlatformBridge::traceEventBegin):
        (WebCore::PlatformBridge::traceEventEnd):
        (WebCore::PlatformBridge::visitedLinkHash):
        (WebCore::PlatformBridge::isLinkVisited):
        (WebCore::PlatformBridge::notifyJSOutOfMemory):
        (WebCore::PlatformBridge::memoryUsageMB):
        (WebCore::PlatformBridge::actualMemoryUsageMB):
        (WebCore::PlatformBridge::screenDepth):
        (WebCore::PlatformBridge::screenDepthPerComponent):
        (WebCore::PlatformBridge::screenIsMonochrome):
        (WebCore::PlatformBridge::screenRect):
        (WebCore::PlatformBridge::screenAvailableRect):
        (WebCore::PlatformBridge::popupsAllowed):
        (WebCore::WorkerContextProxy::create):
        * src/ResourceHandle.cpp:
        (WebCore::ResourceHandle::cacheMetadata):
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::WebFrameImpl):
        (WebKit::WebFrameImpl::~WebFrameImpl):
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):

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

57 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/page/PageGroup.cpp
Source/WebCore/platform/android/PlatformBridge.h
Source/WebCore/platform/audio/chromium/AudioBusChromium.cpp
Source/WebCore/platform/chromium/ChromiumBridge.h [deleted file]
Source/WebCore/platform/chromium/ChromiumDataObjectLegacy.cpp
Source/WebCore/platform/chromium/DragDataChromium.cpp
Source/WebCore/platform/chromium/FileSystemChromium.cpp
Source/WebCore/platform/chromium/LanguageChromium.cpp
Source/WebCore/platform/chromium/LinkHashChromium.cpp
Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp
Source/WebCore/platform/chromium/PasteboardChromium.cpp
Source/WebCore/platform/chromium/PlatformBridge.h
Source/WebCore/platform/chromium/PlatformScreenChromium.cpp
Source/WebCore/platform/chromium/ReadableDataObject.cpp
Source/WebCore/platform/chromium/SSLKeyGeneratorChromium.cpp
Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp
Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
Source/WebCore/platform/chromium/ScrollbarThemeChromiumWin.cpp
Source/WebCore/platform/chromium/SharedTimerChromium.cpp
Source/WebCore/platform/chromium/SuddenTerminationChromium.cpp
Source/WebCore/platform/chromium/SystemTimeChromium.cpp
Source/WebCore/platform/chromium/WritableDataObject.cpp
Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
Source/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
Source/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp
Source/WebCore/platform/graphics/chromium/ImageChromium.cpp
Source/WebCore/platform/graphics/chromium/ImageChromiumMac.mm
Source/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
Source/WebCore/platform/graphics/chromium/UniscribeHelperTextRun.cpp
Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
Source/WebCore/platform/network/chromium/CookieJarChromium.cpp
Source/WebCore/platform/network/chromium/DNSChromium.cpp
Source/WebCore/platform/qt/PlatformBridge.h
Source/WebCore/platform/sql/chromium/SQLiteFileSystemChromium.cpp
Source/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp
Source/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp
Source/WebCore/plugins/chromium/PluginDataChromium.cpp
Source/WebCore/rendering/RenderThemeChromiumMac.mm
Source/WebCore/rendering/RenderThemeChromiumSkia.cpp
Source/WebCore/rendering/RenderThemeChromiumWin.cpp
Source/WebCore/storage/chromium/IDBFactoryBackendInterface.cpp
Source/WebCore/storage/chromium/IDBKeyPathBackendImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/src/AssertMatchingEnums.cpp
Source/WebKit/chromium/src/PlatformBridge.cpp [moved from Source/WebKit/chromium/src/ChromiumBridge.cpp with 79% similarity]
Source/WebKit/chromium/src/ResourceHandle.cpp
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp

index 9cbb966..464673f 100644 (file)
@@ -1,3 +1,170 @@
+2011-01-21  Adam Klein  <adamk@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [chromium] Rename ChromiumBridge to PlatformBridge
+        https://bugs.webkit.org/show_bug.cgi?id=52471
+
+        No tests added as this is a rename; no change in behavior.
+
+        * WebCore.gypi:
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::reportFatalErrorInV8):
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::isLinkVisited):
+        * platform/android/PlatformBridge.h:
+        * platform/audio/chromium/AudioBusChromium.cpp:
+        (WebCore::createBusFromInMemoryAudioFile):
+        * platform/chromium/ChromiumBridge.h: Removed.
+        * platform/chromium/ChromiumDataObjectLegacy.cpp:
+        (WebCore::ChromiumDataObjectLegacy::getData):
+        * platform/chromium/DragDataChromium.cpp:
+        (WebCore::DragData::asURL):
+        * platform/chromium/FileSystemChromium.cpp:
+        (WebCore::deleteFile):
+        (WebCore::deleteEmptyDirectory):
+        (WebCore::getFileSize):
+        (WebCore::getFileModificationTime):
+        (WebCore::revealFolderInOS):
+        (WebCore::directoryName):
+        (WebCore::pathByAppendingComponent):
+        (WebCore::makeAllDirectories):
+        (WebCore::fileExists):
+        (WebCore::openFile):
+        (WebCore::closeFile):
+        (WebCore::seekFile):
+        (WebCore::truncateFile):
+        (WebCore::readFromFile):
+        (WebCore::writeToFile):
+        * platform/chromium/LanguageChromium.cpp:
+        (WebCore::platformDefaultLanguage):
+        * platform/chromium/LinkHashChromium.cpp:
+        (WebCore::visitedLinkHash):
+        * platform/chromium/MIMETypeRegistryChromium.cpp:
+        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
+        (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
+        (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
+        (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
+        * platform/chromium/PasteboardChromium.cpp:
+        (WebCore::Pasteboard::writeSelection):
+        (WebCore::Pasteboard::writePlainText):
+        (WebCore::Pasteboard::writeURL):
+        (WebCore::Pasteboard::writeImage):
+        (WebCore::Pasteboard::canSmartReplace):
+        (WebCore::Pasteboard::plainText):
+        (WebCore::Pasteboard::documentFragment):
+        * platform/chromium/PlatformBridge.h:
+        * platform/chromium/PlatformScreenChromium.cpp:
+        (WebCore::screenDepth):
+        (WebCore::screenDepthPerComponent):
+        (WebCore::screenIsMonochrome):
+        (WebCore::screenRect):
+        (WebCore::screenAvailableRect):
+        * platform/chromium/ReadableDataObject.cpp:
+        (WebCore::ReadableDataObject::getData):
+        (WebCore::ReadableDataObject::urlTitle):
+        (WebCore::ReadableDataObject::htmlBaseUrl):
+        (WebCore::ReadableDataObject::filenames):
+        (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
+        * platform/chromium/SSLKeyGeneratorChromium.cpp:
+        (WebCore::signedPublicKeyAndChallengeString):
+        * platform/chromium/ScrollbarThemeChromium.cpp:
+        * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+        (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
+        (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
+        (WebCore::ScrollbarThemeChromiumLinux::paintButton):
+        (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
+        (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
+        (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
+        * platform/chromium/ScrollbarThemeChromiumMac.mm:
+        (WebCore::scrollbarStateToThemeState):
+        (WebCore::ScrollbarThemeChromiumMac::paint):
+        * platform/chromium/ScrollbarThemeChromiumWin.cpp:
+        (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
+        (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
+        (WebCore::ScrollbarThemeChromiumWin::paintButton):
+        (WebCore::ScrollbarThemeChromiumWin::paintThumb):
+        (WebCore::ScrollbarThemeChromiumWin::buttonSize):
+        * platform/chromium/SharedTimerChromium.cpp:
+        (WebCore::setSharedTimerFiredFunction):
+        (WebCore::setSharedTimerFireTime):
+        (WebCore::stopSharedTimer):
+        * platform/chromium/SuddenTerminationChromium.cpp:
+        (WebCore::disableSuddenTermination):
+        (WebCore::enableSuddenTermination):
+        * platform/chromium/SystemTimeChromium.cpp:
+        (WebCore::currentTime):
+        * platform/chromium/WritableDataObject.cpp:
+        (WebCore::WritableDataObject::setData):
+        * platform/graphics/chromium/CrossProcessFontLoading.mm:
+        * platform/graphics/chromium/FontCacheChromiumWin.cpp:
+        (WebCore::fontContainsCharacter):
+        (WebCore::FillLogFont):
+        * platform/graphics/chromium/FontCacheLinux.cpp:
+        (WebCore::FontCache::getFontDataForCharacters):
+        * platform/graphics/chromium/FontChromiumWin.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
+        (WebCore::FontPlatformData::scriptFontProperties):
+        * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+        (WebCore::FontPlatformData::querySystemForRenderStyle):
+        * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
+        (WebCore::fillBMPGlyphs):
+        * platform/graphics/chromium/ImageChromium.cpp:
+        (WebCore::Image::loadPlatformResource):
+        * platform/graphics/chromium/ImageChromiumMac.mm:
+        (WebCore::Image::loadPlatformResource):
+        * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
+        (WebCore::SimpleFontData::platformInit):
+        (WebCore::SimpleFontData::determinePitch):
+        (WebCore::SimpleFontData::platformWidthForGlyph):
+        * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
+        (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
+        * platform/graphics/skia/FontCustomPlatformData.cpp:
+        (WebCore::FontCustomPlatformData::fontPlatformData):
+        * platform/network/chromium/CookieJarChromium.cpp:
+        (WebCore::setCookies):
+        (WebCore::cookies):
+        (WebCore::cookieRequestHeaderFieldValue):
+        (WebCore::cookiesEnabled):
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/chromium/DNSChromium.cpp:
+        (WebCore::prefetchDNS):
+        * platform/qt/PlatformBridge.h:
+        * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+        (WebCore::SQLiteFileSystem::deleteDatabaseFile):
+        (WebCore::SQLiteFileSystem::getDatabaseFileSize):
+        * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+        (chromiumOpen):
+        (chromiumDelete):
+        (chromiumAccess):
+        * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+        * plugins/chromium/PluginDataChromium.cpp:
+        (WebCore::PluginCache::plugins):
+        * rendering/RenderThemeChromiumMac.mm:
+        (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
+        * rendering/RenderThemeChromiumWin.cpp:
+        (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
+        (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
+        (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
+        (WebCore::RenderThemeChromiumWin::systemColor):
+        (WebCore::RenderThemeChromiumWin::paintButton):
+        (WebCore::RenderThemeChromiumWin::paintSliderTrack):
+        (WebCore::menuListButtonWidth):
+        (WebCore::RenderThemeChromiumWin::paintMenuList):
+        (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
+        (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
+        (WebCore::RenderThemeChromiumWin::paintProgressBar):
+        * storage/chromium/IDBFactoryBackendInterface.cpp:
+        (WebCore::IDBFactoryBackendInterface::create):
+        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
+        * storage/chromium/IDBKeyPathBackendImpl.cpp:
+        (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
+
 2011-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r76335.
index 534ddf2..0348c06 100644 (file)
             'platform/cf/SchedulePair.cpp',
             'platform/cf/SchedulePair.h',
             'platform/cf/SharedBufferCF.cpp',
-            'platform/chromium/ChromiumBridge.h',
             'platform/chromium/ChromiumDataObject.cpp',
             'platform/chromium/ChromiumDataObject.h',
             'platform/chromium/ChromiumDataObjectLegacy.cpp',
             'platform/chromium/MIMETypeRegistryChromium.cpp',
             'platform/chromium/PasteboardChromium.cpp',
             'platform/chromium/PasteboardPrivate.h',
+            'platform/chromium/PlatformBridge.h',
             'platform/chromium/PlatformCursor.h',
             'platform/chromium/PlatformKeyboardEventChromium.cpp',
             'platform/chromium/PlatformScreenChromium.cpp',
index f4b1eb7..ea2c3c4 100644 (file)
@@ -85,7 +85,7 @@ static void reportFatalErrorInV8(const char* location, const char* message)
     // FIXME: clean up V8Proxy and disable JavaScript.
     int memoryUsageMB = -1;
 #if PLATFORM(CHROMIUM)
-    memoryUsageMB = ChromiumBridge::actualMemoryUsageMB();
+    memoryUsageMB = PlatformBridge::actualMemoryUsageMB();
 #endif
     printf("V8 error: %s (%s).  Current memory usage: %d MB\n", message, location, memoryUsageMB);
     handleFatalErrorInV8();
index 8b902c0..b9b0e34 100644 (file)
@@ -37,7 +37,7 @@
 #include "StorageNamespace.h"
 
 #if PLATFORM(CHROMIUM)
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #endif
 
 namespace WebCore {
@@ -128,7 +128,7 @@ bool PageGroup::isLinkVisited(LinkHash visitedLinkHash)
 {
 #if PLATFORM(CHROMIUM)
     // Use Chromium's built-in visited link database.
-    return ChromiumBridge::isLinkVisited(visitedLinkHash);
+    return PlatformBridge::isLinkVisited(visitedLinkHash);
 #else
     if (!m_visitedLinksPopulated) {
         m_visitedLinksPopulated = true;
index 4269ef8..81d9a1f 100644 (file)
@@ -86,7 +86,7 @@ class Widget;
 
 // An interface to the embedding layer, which has the ability to answer
 // questions about the system and so on...
-// This is very similar to ChromiumBridge and the two are likely to converge
+// This is very similar to chromium/PlatformBridge and the two are likely to converge
 // in the future.
 //
 // The methods in this class all need to reach across a JNI layer to the Java VM
index a93703d..9eef84e 100644 (file)
@@ -29,7 +29,7 @@
 #include "AudioBus.h"
 
 #include "AudioFileReader.h"
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
@@ -38,12 +38,12 @@ namespace WebCore {
 
 // PassOwnPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, double sampleRate)
 // {
-//     return ChromiumBridge::loadPlatformAudioResource(name, sampleRate);
+//     return PlatformBridge::loadPlatformAudioResource(name, sampleRate);
 // }
 
 PassOwnPtr<AudioBus> createBusFromInMemoryAudioFile(const void* data, size_t dataSize, bool mixToMono, double sampleRate)
 {
-    OwnPtr<AudioBus> audioBus = ChromiumBridge::decodeAudioFileData(static_cast<const char*>(data), dataSize, sampleRate);
+    OwnPtr<AudioBus> audioBus = PlatformBridge::decodeAudioFileData(static_cast<const char*>(data), dataSize, sampleRate);
     if (audioBus->numberOfChannels() == 2 && mixToMono) {
         OwnPtr<AudioBus> monoAudioBus = adoptPtr(new AudioBus(1, audioBus->length()));
 
diff --git a/Source/WebCore/platform/chromium/ChromiumBridge.h b/Source/WebCore/platform/chromium/ChromiumBridge.h
deleted file mode 100644 (file)
index f104b2c..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2010, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ChromiumBridge_h
-#define ChromiumBridge_h
-
-#if ENABLE(WEB_AUDIO)
-#include "AudioBus.h"
-#endif
-
-#include "FileSystem.h"
-#include "ImageSource.h"
-#include "LinkHash.h"
-#include "PassRefPtr.h"
-#include "PasteboardPrivate.h"
-#include "PluginData.h"
-
-#include <wtf/Forward.h>
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-
-typedef struct NPObject NPObject;
-typedef struct _NPP NPP_t;
-typedef NPP_t* NPP;
-
-#if OS(DARWIN)
-typedef struct CGFont* CGFontRef;
-typedef uintptr_t ATSFontContainerRef;
-#ifdef __OBJC__
-@class NSFont;
-#else
-class NSFont;
-#endif
-#endif // OS(DARWIN)
-
-#if OS(WINDOWS)
-typedef struct HFONT__* HFONT;
-#endif
-
-namespace WebCore {
-
-    class ClipboardData;
-    class Color;
-    class Cursor;
-    class Document;
-    class Frame;
-    class GeolocationServiceBridge;
-    class GeolocationServiceChromium;
-    class GraphicsContext;
-    class Image;
-    class IDBFactoryBackendInterface;
-    class IDBKey;
-    class IntRect;
-    class KURL;
-    class SerializedScriptValue;
-    class Widget;
-
-    struct Cookie;
-    struct FontRenderStyle;
-
-    // An interface to the embedding layer, which has the ability to answer
-    // questions about the system and so on...
-
-    class ChromiumBridge {
-    public:
-        // Cache --------------------------------------------------------------
-        static void cacheMetadata(const KURL& url, double responseTime, const Vector<char>&);
-
-        // Clipboard ----------------------------------------------------------
-        static bool clipboardIsFormatAvailable(PasteboardPrivate::ClipboardFormat, PasteboardPrivate::ClipboardBuffer);
-
-        static String clipboardReadPlainText(PasteboardPrivate::ClipboardBuffer);
-        static void clipboardReadHTML(PasteboardPrivate::ClipboardBuffer, String*, KURL*);
-
-        // Only the clipboardRead functions take a buffer argument because
-        // Chromium currently uses a different technique to write to alternate
-        // clipboard buffers.
-        static void clipboardWriteSelection(const String&, const KURL&, const String&, bool);
-        static void clipboardWritePlainText(const String&);
-        static void clipboardWriteURL(const KURL&, const String&);
-        static void clipboardWriteImage(NativeImagePtr, const KURL&, const String&);
-        static void clipboardWriteData(const String& type, const String& data, const String& metadata);
-
-        // Interface for handling copy and paste, drag and drop, and selection copy.
-        static HashSet<String> clipboardReadAvailableTypes(PasteboardPrivate::ClipboardBuffer, bool* containsFilenames);
-        static bool clipboardReadData(PasteboardPrivate::ClipboardBuffer, const String& type, String& data, String& metadata);
-        static Vector<String> clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer);
-
-        // Cookies ------------------------------------------------------------
-        static void setCookies(const Document*, const KURL&, const String& value);
-        static String cookies(const Document*, const KURL&);
-        static String cookieRequestHeaderFieldValue(const Document*, const KURL&);
-        static bool rawCookies(const Document*, const KURL& url, Vector<Cookie>&);
-        static void deleteCookie(const Document*, const KURL& url, const String& cookieName);
-        static bool cookiesEnabled(const Document*);
-
-        // DNS ----------------------------------------------------------------
-        static void prefetchDNS(const String& hostname);
-
-        // File ---------------------------------------------------------------
-        static void revealFolderInOS(const String&);
-        static bool fileExists(const String&);
-        static bool deleteFile(const String&);
-        static bool deleteEmptyDirectory(const String&);
-        static bool getFileSize(const String&, long long& result);
-        static bool getFileModificationTime(const String&, time_t& result);
-        static String directoryName(const String& path);
-        static String pathByAppendingComponent(const String& path, const String& component);
-        static bool makeAllDirectories(const String& path);
-        static String getAbsolutePath(const String&);
-        static bool isDirectory(const String&);
-        static KURL filePathToURL(const String&);
-        static PlatformFileHandle openFile(const String& path, FileOpenMode);
-        static void closeFile(PlatformFileHandle&);
-        static long long seekFile(PlatformFileHandle, long long offset, FileSeekOrigin);
-        static bool truncateFile(PlatformFileHandle, long long offset);
-        static int readFromFile(PlatformFileHandle, char* data, int length);
-        static int writeToFile(PlatformFileHandle, const char* data, int length);
-
-        // Font ---------------------------------------------------------------
-#if OS(WINDOWS)
-        static bool ensureFontLoaded(HFONT font);
-#endif
-#if OS(LINUX) || OS(FREEBSD)
-        static void getRenderStyleForStrike(const char* family, int sizeAndStyle, FontRenderStyle* result);
-        static String getFontFamilyForCharacters(const UChar*, size_t numCharacters);
-#endif
-#if OS(DARWIN)
-        static bool loadFont(NSFont* srcFont, ATSFontContainerRef* out);
-#endif
-
-        // Forms --------------------------------------------------------------
-        static void notifyFormStateChanged(const Document*);
-
-        // Databases ----------------------------------------------------------
-        // Returns a handle to the DB file and ooptionally a handle to its containing directory
-        static PlatformFileHandle databaseOpenFile(const String& vfsFleName, int desiredFlags);
-        // Returns a SQLite code (SQLITE_OK = 0, on success)
-        static int databaseDeleteFile(const String& vfsFileName, bool syncDir = false);
-        // Returns the attributes of the DB file
-        static long databaseGetFileAttributes(const String& vfsFileName);
-        // Returns the size of the DB file
-        static long long databaseGetFileSize(const String& vfsFileName);
-
-        // IndexedDB ----------------------------------------------------------
-        static PassRefPtr<IDBFactoryBackendInterface> idbFactory();
-        static void idbShutdown();
-        // Extracts keyPath from values and returns the corresponding keys.
-        static void createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys);
-
-        // JavaScript ---------------------------------------------------------
-        static void notifyJSOutOfMemory(Frame*);
-        static bool allowScriptDespiteSettings(const KURL& documentURL);
-
-        // Keygen -------------------------------------------------------------
-        static String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challenge, const KURL& url);
-
-        // Language -----------------------------------------------------------
-        static String computedDefaultLanguage();
-
-        // LayoutTestMode -----------------------------------------------------
-        static bool layoutTestMode();
-
-        // Memory -------------------------------------------------------------
-        // Returns the current space allocated for the pagefile, in MB.
-        // That is committed size for Windows and virtual memory size for POSIX
-        static int memoryUsageMB();
-
-        // Same as above, but always returns actual value, without any caches.
-        static int actualMemoryUsageMB();
-
-        // MimeType -----------------------------------------------------------
-        static bool isSupportedImageMIMEType(const String& mimeType);
-        static bool isSupportedJavaScriptMIMEType(const String& mimeType);
-        static bool isSupportedNonImageMIMEType(const String& mimeType);
-        static String mimeTypeForExtension(const String& fileExtension);
-        static String mimeTypeFromFile(const String& filePath);
-        static String preferredExtensionForMIMEType(const String& mimeType);
-
-        // Plugin -------------------------------------------------------------
-        static bool plugins(bool refresh, Vector<PluginInfo>*);
-        static NPObject* pluginScriptableObject(Widget*);
-        static bool popupsAllowed(NPP);
-
-        // Resources ----------------------------------------------------------
-        static PassRefPtr<Image> loadPlatformImageResource(const char* name);
-
-#if ENABLE(WEB_AUDIO)
-        static PassOwnPtr<AudioBus> loadPlatformAudioResource(const char* name, double sampleRate);
-        static PassOwnPtr<AudioBus> decodeAudioFileData(const char* data, size_t size, double sampleRate);
-#endif
-
-        // Sandbox ------------------------------------------------------------
-        static bool sandboxEnabled();
-
-        // Screen -------------------------------------------------------------
-        static int screenDepth(Widget*);
-        static int screenDepthPerComponent(Widget*);
-        static bool screenIsMonochrome(Widget*);
-        static IntRect screenRect(Widget*);
-        static IntRect screenAvailableRect(Widget*);
-
-        // SharedTimers -------------------------------------------------------
-        static void setSharedTimerFiredFunction(void (*func)());
-        static void setSharedTimerFireTime(double fireTime);
-        static void stopSharedTimer();
-
-        // StatsCounters ------------------------------------------------------
-        static void decrementStatsCounter(const char* name);
-        static void incrementStatsCounter(const char* name);
-        static void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount);
-        static void histogramEnumeration(const char* name, int sample, int boundaryValue);
-
-        // Sudden Termination
-        static void suddenTerminationChanged(bool enabled);
-
-        // SystemTime ---------------------------------------------------------
-        static double currentTime();
-
-        // Theming ------------------------------------------------------------
-#if OS(WINDOWS)
-        static void paintButton(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&);
-        static void paintMenuList(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&);
-        static void paintScrollbarArrow(
-            GraphicsContext*, int state, int classicState, const IntRect&);
-        static void paintScrollbarThumb(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&);
-        static void paintScrollbarTrack(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&, const IntRect& alignRect);
-        static void paintSpinButton(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&);
-        static void paintTextField(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&, const Color&, bool fillContentArea, bool drawEdges);
-        static void paintTrackbar(
-            GraphicsContext*, int part, int state, int classicState, const IntRect&);
-        static void paintProgressBar(
-            GraphicsContext*, const IntRect& barRect, const IntRect& valueRect, bool determinate, double animatedSeconds);
-#elif OS(LINUX)
-        // The UI part which is being accessed.
-        enum ThemePart {
-            PartScrollbarDownArrow,
-            PartScrollbarLeftArrow,
-            PartScrollbarRightArrow,
-            PartScrollbarUpArrow,
-            PartScrollbarHorizontalThumb,
-            PartScrollbarVerticalThumb,
-            PartScrollbarHorizontalTrack,
-            PartScrollbarVerticalTrack,
-        };
-
-        // The current state of the associated Part.
-        enum ThemePaintState {
-            StateDisabled,
-            StateHover,
-            StateNormal,
-            StatePressed,
-        };
-
-        struct ScrollbarTrackExtraParams {
-            // The bounds of the entire track, as opposed to the part being painted.
-            int trackX;
-            int trackY;
-            int trackWidth;
-            int trackHeight;
-        };
-
-        union ThemePaintExtraParams {
-            ScrollbarTrackExtraParams scrollbarTrack;
-        };
-
-        // Gets the size of the given theme part. For variable sized items
-        // like vertical scrollbar thumbs, the width will be the required width of
-        // the track while the height will be the minimum height.
-        static IntSize getThemePartSize(ThemePart);
-        // Paint the given the given theme part.
-        static void paintThemePart(GraphicsContext*, ThemePart, ThemePaintState, const IntRect&, const ThemePaintExtraParams*);
-#elif OS(DARWIN)
-        enum ThemePaintState {
-            StateDisabled,
-            StateInactive,
-            StateActive,
-            StatePressed,
-        };
-
-        enum ThemePaintSize {
-            SizeRegular,
-            SizeSmall,
-        };
-
-        enum ThemePaintScrollbarOrientation {
-            ScrollbarOrientationHorizontal,
-            ScrollbarOrientationVertical,
-        };
-
-        enum ThemePaintScrollbarParent {
-            ScrollbarParentScrollView,
-            ScrollbarParentRenderLayer,
-        };
-
-        struct ThemePaintScrollbarInfo {
-            ThemePaintScrollbarOrientation orientation;
-            ThemePaintScrollbarParent parent;
-            int maxValue;
-            int currentValue;
-            int visibleSize;
-            int totalSize;
-        };
-
-        static void paintScrollbarThumb(GraphicsContext*, ThemePaintState, ThemePaintSize, const IntRect&, const ThemePaintScrollbarInfo&);
-#endif
-
-        // Trace Event --------------------------------------------------------
-        static void traceEventBegin(const char* name, void* id, const char* extra);
-        static void traceEventEnd(const char* name, void* id, const char* extra);
-
-        // Visited links ------------------------------------------------------
-        static LinkHash visitedLinkHash(const UChar* url, unsigned length);
-        static LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL);
-        static bool isLinkVisited(LinkHash);
-    };
-
-} // namespace WebCore
-
-#endif
index a2952c0..82e47e2 100644 (file)
@@ -31,9 +31,9 @@
 #include "config.h"
 #include "ChromiumDataObjectLegacy.h"
 
-#include "ChromiumBridge.h"
 #include "ClipboardMimeTypes.h"
 #include "Pasteboard.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -132,7 +132,7 @@ String ChromiumDataObjectLegacy::getData(const String& type, bool& success)
                 Pasteboard::generalPasteboard()->isSelectionMode() ?
                 PasteboardPrivate::SelectionBuffer :
                 PasteboardPrivate::StandardBuffer;
-            String text = ChromiumBridge::clipboardReadPlainText(buffer);
+            String text = PlatformBridge::clipboardReadPlainText(buffer);
             success = !text.isEmpty();
             return text;
         }
@@ -158,7 +158,7 @@ String ChromiumDataObjectLegacy::getData(const String& type, bool& success)
                 PasteboardPrivate::StandardBuffer;
             String htmlText;
             KURL sourceURL;
-            ChromiumBridge::clipboardReadHTML(buffer, &htmlText, &sourceURL);
+            PlatformBridge::clipboardReadHTML(buffer, &htmlText, &sourceURL);
             success = !htmlText.isEmpty();
             return htmlText;
         }
index 8c20a00..9312505 100644 (file)
 #include "config.h"
 #include "DragData.h"
 
-#include "ChromiumBridge.h"
 #include "ChromiumDataObject.h"
 #include "ClipboardMimeTypes.h"
 #include "DocumentFragment.h"
 #include "FileSystem.h"
 #include "Frame.h"
 #include "KURL.h"
-#include "markup.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 #include "PlatformString.h"
+#include "markup.h"
 
 namespace WebCore {
 
@@ -63,7 +63,7 @@ String DragData::asURL(Frame*, FilenameConversionPolicy filenamePolicy, String*
         if (title)
             *title = m_platformDragData->urlTitle();
     } else if (filenamePolicy == ConvertFilenames && containsFiles()) {
-        url = ChromiumBridge::filePathToURL(ChromiumBridge::getAbsolutePath(m_platformDragData->filenames()[0]));
+        url = PlatformBridge::filePathToURL(PlatformBridge::getAbsolutePath(m_platformDragData->filenames()[0]));
     }
     return url;
 }
index d8a1e3f..faf5e92 100644 (file)
 #include "config.h"
 #include "FileSystem.h"
 
-#include "ChromiumBridge.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 #include "PlatformString.h"
 
 namespace WebCore {
 
 bool deleteFile(const String& path)
 {
-    return ChromiumBridge::deleteFile(path);
+    return PlatformBridge::deleteFile(path);
 }
 
 bool deleteEmptyDirectory(const String& path)
 {
-    return ChromiumBridge::deleteEmptyDirectory(path);
+    return PlatformBridge::deleteEmptyDirectory(path);
 }
 
 bool getFileSize(const String& path, long long& result)
 {
-    return ChromiumBridge::getFileSize(path, result);
+    return PlatformBridge::getFileSize(path, result);
 }
 
 bool getFileModificationTime(const String& path, time_t& result)
 {
-    return ChromiumBridge::getFileModificationTime(path, result);
+    return PlatformBridge::getFileModificationTime(path, result);
 }
 
 void revealFolderInOS(const String& path)
 {
-    ChromiumBridge::revealFolderInOS(path);
+    PlatformBridge::revealFolderInOS(path);
 }
 
 String directoryName(const String& path)
 {
-    return ChromiumBridge::directoryName(path);
+    return PlatformBridge::directoryName(path);
 }
 
 String pathByAppendingComponent(const String& path, const String& component)
 {
-    return ChromiumBridge::pathByAppendingComponent(path, component);
+    return PlatformBridge::pathByAppendingComponent(path, component);
 }
 
 bool makeAllDirectories(const String& path)
 {
-    return ChromiumBridge::makeAllDirectories(path);
+    return PlatformBridge::makeAllDirectories(path);
 }
 
 bool fileExists(const String& path)
 {
-    return ChromiumBridge::fileExists(path);
+    return PlatformBridge::fileExists(path);
 }
 
 PlatformFileHandle openFile(const String& path, FileOpenMode mode)
 {
-    return ChromiumBridge::openFile(path, mode);
+    return PlatformBridge::openFile(path, mode);
 }
 
 void closeFile(PlatformFileHandle& handle)
 {
-    return ChromiumBridge::closeFile(handle);
+    return PlatformBridge::closeFile(handle);
 }
 
 long long seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
 {
-    return ChromiumBridge::seekFile(handle, offset, origin);
+    return PlatformBridge::seekFile(handle, offset, origin);
 }
 
 bool truncateFile(PlatformFileHandle handle, long long offset)
 {
-    return ChromiumBridge::truncateFile(handle, offset);
+    return PlatformBridge::truncateFile(handle, offset);
 }
 
 int readFromFile(PlatformFileHandle handle, char* data, int length)
 {
-    return ChromiumBridge::readFromFile(handle, data, length);
+    return PlatformBridge::readFromFile(handle, data, length);
 }
 
 int writeToFile(PlatformFileHandle handle, const char* data, int length)
 {
-    return ChromiumBridge::writeToFile(handle, data, length);
+    return PlatformBridge::writeToFile(handle, data, length);
 }
 
 } // namespace WebCore
index 69fe372..fedc4d5 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "Language.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "PlatformString.h"
 
 namespace WebCore {
@@ -40,7 +40,7 @@ String platformDefaultLanguage()
 {
     static String computedDefaultLanguage;
     if (computedDefaultLanguage.isEmpty())
-        computedDefaultLanguage = ChromiumBridge::computedDefaultLanguage();
+        computedDefaultLanguage = PlatformBridge::computedDefaultLanguage();
     return computedDefaultLanguage;
 }
 
index 9cb93ea..5e1ffa4 100644 (file)
 #include "config.h"
 #include "LinkHash.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 LinkHash visitedLinkHash(const UChar* url, unsigned length)
 {
-    return ChromiumBridge::visitedLinkHash(url, length);
+    return PlatformBridge::visitedLinkHash(url, length);
 }
 
 LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL)
 {
-    return ChromiumBridge::visitedLinkHash(base, attributeURL);
+    return PlatformBridge::visitedLinkHash(base, attributeURL);
 }
 
 } // namespace WebCore
index 9df8847..fec0e9b 100644 (file)
 #include "config.h"
 #include "MIMETypeRegistry.h"
 
-#include "ChromiumBridge.h"
 #include "MediaPlayer.h"
+#include "PlatformBridge.h"
 #include "PluginDataChromium.h"
 #include <wtf/text/CString.h>
 
 // NOTE: Unlike other ports, we don't use the shared implementation bits in
 // MIMETypeRegistry.cpp.  Instead, we need to route most functions via the
-// ChromiumBridge to the embedder.
+// PlatformBridge to the embedder.
 
 namespace WebCore {
 
 String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
 {
-    return ChromiumBridge::mimeTypeForExtension(ext);
+    return PlatformBridge::mimeTypeForExtension(ext);
 }
 
 // Returns the file extension if one is found.  Does not include the dot in the
@@ -55,7 +55,7 @@ String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& type)
     // FIXME: Is this really necessary??
     String mimeType = type.substring(0, static_cast<unsigned>(type.find(';')));
 
-    String ext = ChromiumBridge::preferredExtensionForMIMEType(type);
+    String ext = PlatformBridge::preferredExtensionForMIMEType(type);
     if (!ext.isEmpty() && ext[0] == '.')
         ext = ext.substring(1);
 
@@ -81,7 +81,7 @@ String MIMETypeRegistry::getMIMETypeForPath(const String& path)
 
 bool MIMETypeRegistry::isSupportedImageMIMEType(const String& mimeType)
 { 
-    return ChromiumBridge::isSupportedImageMIMEType(mimeType);
+    return PlatformBridge::isSupportedImageMIMEType(mimeType);
 }
 
 bool MIMETypeRegistry::isSupportedImageResourceMIMEType(const String& mimeType)
@@ -96,12 +96,12 @@ bool MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(const String& mimeTyp
 
 bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType)
 {
-    return ChromiumBridge::isSupportedJavaScriptMIMEType(mimeType);
+    return PlatformBridge::isSupportedJavaScriptMIMEType(mimeType);
 }
     
 bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType)
 {
-    return ChromiumBridge::isSupportedNonImageMIMEType(mimeType);
+    return PlatformBridge::isSupportedNonImageMIMEType(mimeType);
 }
 
 bool MIMETypeRegistry::isSupportedMediaMIMEType(const String& mimeType)
index 907a4b9..6beb017 100644 (file)
 #include "config.h"
 #include "Pasteboard.h"
 
-#include "ChromiumBridge.h"
 #include "ClipboardUtilitiesChromium.h"
-#include "DocumentFragment.h"
 #include "Document.h"
+#include "DocumentFragment.h"
 #include "Element.h"
 #include "Frame.h"
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
 #include "Image.h"
 #include "KURL.h"
-#include "markup.h"
 #include "NativeImageSkia.h"
+#include "PlatformBridge.h"
 #include "Range.h"
 #include "RenderImage.h"
+#include "markup.h"
 
 #if ENABLE(SVG)
 #include "SVGNames.h"
@@ -91,7 +91,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
 #endif
     replaceNBSPWithSpace(plainText);
 
-    ChromiumBridge::clipboardWriteSelection(html, url, plainText, canSmartCopyOrDelete);
+    PlatformBridge::clipboardWriteSelection(html, url, plainText, canSmartCopyOrDelete);
 }
 
 void Pasteboard::writePlainText(const String& text)
@@ -99,9 +99,9 @@ void Pasteboard::writePlainText(const String& text)
 #if OS(WINDOWS)
     String plainText(text);
     replaceNewlinesWithWindowsStyleNewlines(plainText);
-    ChromiumBridge::clipboardWritePlainText(plainText);
+    PlatformBridge::clipboardWritePlainText(plainText);
 #else
-    ChromiumBridge::clipboardWritePlainText(text);
+    PlatformBridge::clipboardWritePlainText(text);
 #endif
 }
 
@@ -116,7 +116,7 @@ void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame)
             title = url.host();
     }
 
-    ChromiumBridge::clipboardWriteURL(url, title);
+    PlatformBridge::clipboardWriteURL(url, title);
 }
 
 void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
@@ -150,17 +150,17 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
     }
     KURL url = urlString.isEmpty() ? KURL() : node->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
 
-    ChromiumBridge::clipboardWriteImage(bitmap, url, title);
+    PlatformBridge::clipboardWriteImage(bitmap, url, title);
 }
 
 bool Pasteboard::canSmartReplace()
 {
-    return ChromiumBridge::clipboardIsFormatAvailable(PasteboardPrivate::WebSmartPasteFormat, m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
+    return PlatformBridge::clipboardIsFormatAvailable(PasteboardPrivate::WebSmartPasteFormat, m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
 }
 
 String Pasteboard::plainText(Frame* frame)
 {
-    return ChromiumBridge::clipboardReadPlainText(m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
+    return PlatformBridge::clipboardReadPlainText(m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer);
 }
 
 PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context, bool allowPlainText, bool& chosePlainText)
@@ -168,10 +168,10 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
     chosePlainText = false;
     PasteboardPrivate::ClipboardBuffer buffer = m_selectionMode ? PasteboardPrivate::SelectionBuffer : PasteboardPrivate::StandardBuffer;
 
-    if (ChromiumBridge::clipboardIsFormatAvailable(PasteboardPrivate::HTMLFormat, buffer)) {
+    if (PlatformBridge::clipboardIsFormatAvailable(PasteboardPrivate::HTMLFormat, buffer)) {
         String markup;
         KURL srcURL;
-        ChromiumBridge::clipboardReadHTML(buffer, &markup, &srcURL);
+        PlatformBridge::clipboardReadHTML(buffer, &markup, &srcURL);
 
         RefPtr<DocumentFragment> fragment =
             createFragmentFromMarkup(frame->document(), markup, srcURL, FragmentScriptingNotAllowed);
@@ -180,7 +180,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
     }
 
     if (allowPlainText) {
-        String markup = ChromiumBridge::clipboardReadPlainText(buffer);
+        String markup = PlatformBridge::clipboardReadPlainText(buffer);
         if (!markup.isEmpty()) {
             chosePlainText = true;
 
index ecb7b45..f5c1ed7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 Google Inc. All rights reserved.
+ * Copyright (c) 2010, Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
 #ifndef PlatformBridge_h
 #define PlatformBridge_h
 
-#include "ChromiumBridge.h"
+#if ENABLE(WEB_AUDIO)
+#include "AudioBus.h"
+#endif
+
+#include "FileSystem.h"
+#include "ImageSource.h"
+#include "LinkHash.h"
+#include "PassRefPtr.h"
+#include "PasteboardPrivate.h"
+#include "PluginData.h"
+
+#include <wtf/Forward.h>
+#include <wtf/HashSet.h>
+#include <wtf/Vector.h>
+
+typedef struct NPObject NPObject;
+typedef struct _NPP NPP_t;
+typedef NPP_t* NPP;
+
+#if OS(DARWIN)
+typedef struct CGFont* CGFontRef;
+typedef uintptr_t ATSFontContainerRef;
+#ifdef __OBJC__
+@class NSFont;
+#else
+class NSFont;
+#endif
+#endif // OS(DARWIN)
+
+#if OS(WINDOWS)
+typedef struct HFONT__* HFONT;
+#endif
 
 namespace WebCore {
 
-// FIXME: A better name for ChromiumBridge is PlatformBridge. Android already
-// uses PlatformBridge so the code that is shared among the Android and Chromium
-// ports is gradually moving towards using PlatformBridge. Once the Android
-// unforking is done, we will change the name of ChromiumBridge to PlatformBridge
-// and merge the two classes into one that will be shared by both ports.
-typedef ChromiumBridge PlatformBridge;
+class ClipboardData;
+class Color;
+class Cursor;
+class Document;
+class Frame;
+class GeolocationServiceBridge;
+class GeolocationServiceChromium;
+class GraphicsContext;
+class Image;
+class IDBFactoryBackendInterface;
+class IDBKey;
+class IntRect;
+class KURL;
+class SerializedScriptValue;
+class Widget;
+
+struct Cookie;
+struct FontRenderStyle;
+
+// An interface to the embedding layer, which has the ability to answer
+// questions about the system and so on...
+
+class PlatformBridge {
+public:
+    // Cache --------------------------------------------------------------
+    static void cacheMetadata(const KURL&, double responseTime, const Vector<char>&);
+
+    // Clipboard ----------------------------------------------------------
+    static bool clipboardIsFormatAvailable(PasteboardPrivate::ClipboardFormat, PasteboardPrivate::ClipboardBuffer);
+
+    static String clipboardReadPlainText(PasteboardPrivate::ClipboardBuffer);
+    static void clipboardReadHTML(PasteboardPrivate::ClipboardBuffer, String*, KURL*);
+
+    // Only the clipboardRead functions take a buffer argument because
+    // Chromium currently uses a different technique to write to alternate
+    // clipboard buffers.
+    static void clipboardWriteSelection(const String&, const KURL&, const String&, bool);
+    static void clipboardWritePlainText(const String&);
+    static void clipboardWriteURL(const KURL&, const String&);
+    static void clipboardWriteImage(NativeImagePtr, const KURL&, const String&);
+    static void clipboardWriteData(const String& type, const String& data, const String& metadata);
+
+    // Interface for handling copy and paste, drag and drop, and selection copy.
+    static HashSet<String> clipboardReadAvailableTypes(PasteboardPrivate::ClipboardBuffer, bool* containsFilenames);
+    static bool clipboardReadData(PasteboardPrivate::ClipboardBuffer, const String& type, String& data, String& metadata);
+    static Vector<String> clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer);
+
+    // Cookies ------------------------------------------------------------
+    static void setCookies(const Document*, const KURL&, const String& value);
+    static String cookies(const Document*, const KURL&);
+    static String cookieRequestHeaderFieldValue(const Document*, const KURL&);
+    static bool rawCookies(const Document*, const KURL&, Vector<Cookie>&);
+    static void deleteCookie(const Document*, const KURL&, const String& cookieName);
+    static bool cookiesEnabled(const Document*);
+
+    // DNS ----------------------------------------------------------------
+    static void prefetchDNS(const String& hostname);
+
+    // File ---------------------------------------------------------------
+    static void revealFolderInOS(const String&);
+    static bool fileExists(const String&);
+    static bool deleteFile(const String&);
+    static bool deleteEmptyDirectory(const String&);
+    static bool getFileSize(const String&, long long& result);
+    static bool getFileModificationTime(const String&, time_t& result);
+    static String directoryName(const String& path);
+    static String pathByAppendingComponent(const String& path, const String& component);
+    static bool makeAllDirectories(const String& path);
+    static String getAbsolutePath(const String&);
+    static bool isDirectory(const String&);
+    static KURL filePathToURL(const String&);
+    static PlatformFileHandle openFile(const String& path, FileOpenMode);
+    static void closeFile(PlatformFileHandle&);
+    static long long seekFile(PlatformFileHandle, long long offset, FileSeekOrigin);
+    static bool truncateFile(PlatformFileHandle, long long offset);
+    static int readFromFile(PlatformFileHandle, char* data, int length);
+    static int writeToFile(PlatformFileHandle, const char* data, int length);
+
+    // Font ---------------------------------------------------------------
+#if OS(WINDOWS)
+    static bool ensureFontLoaded(HFONT);
+#endif
+#if OS(LINUX) || OS(FREEBSD)
+    static void getRenderStyleForStrike(const char* family, int sizeAndStyle, FontRenderStyle* result);
+    static String getFontFamilyForCharacters(const UChar*, size_t numCharacters);
+#endif
+#if OS(DARWIN)
+    static bool loadFont(NSFont* srcFont, ATSFontContainerRef* out);
+#endif
+
+    // Forms --------------------------------------------------------------
+    static void notifyFormStateChanged(const Document*);
+
+    // Databases ----------------------------------------------------------
+    // Returns a handle to the DB file and ooptionally a handle to its containing directory
+    static PlatformFileHandle databaseOpenFile(const String& vfsFleName, int desiredFlags);
+    // Returns a SQLite code (SQLITE_OK = 0, on success)
+    static int databaseDeleteFile(const String& vfsFileName, bool syncDir = false);
+    // Returns the attributes of the DB file
+    static long databaseGetFileAttributes(const String& vfsFileName);
+    // Returns the size of the DB file
+    static long long databaseGetFileSize(const String& vfsFileName);
+
+    // IndexedDB ----------------------------------------------------------
+    static PassRefPtr<IDBFactoryBackendInterface> idbFactory();
+    static void idbShutdown();
+    // Extracts keyPath from values and returns the corresponding keys.
+    static void createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys);
+
+    // JavaScript ---------------------------------------------------------
+    static void notifyJSOutOfMemory(Frame*);
+    static bool allowScriptDespiteSettings(const KURL& documentURL);
+
+    // Keygen -------------------------------------------------------------
+    static String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challenge, const KURL&);
+
+    // Language -----------------------------------------------------------
+    static String computedDefaultLanguage();
+
+    // LayoutTestMode -----------------------------------------------------
+    static bool layoutTestMode();
+
+    // Memory -------------------------------------------------------------
+    // Returns the current space allocated for the pagefile, in MB.
+    // That is committed size for Windows and virtual memory size for POSIX
+    static int memoryUsageMB();
+
+    // Same as above, but always returns actual value, without any caches.
+    static int actualMemoryUsageMB();
+
+    // MimeType -----------------------------------------------------------
+    static bool isSupportedImageMIMEType(const String& mimeType);
+    static bool isSupportedJavaScriptMIMEType(const String& mimeType);
+    static bool isSupportedNonImageMIMEType(const String& mimeType);
+    static String mimeTypeForExtension(const String& fileExtension);
+    static String mimeTypeFromFile(const String& filePath);
+    static String preferredExtensionForMIMEType(const String& mimeType);
+
+    // Plugin -------------------------------------------------------------
+    static bool plugins(bool refresh, Vector<PluginInfo>*);
+    static NPObject* pluginScriptableObject(Widget*);
+    static bool popupsAllowed(NPP);
+
+    // Resources ----------------------------------------------------------
+    static PassRefPtr<Image> loadPlatformImageResource(const char* name);
+
+#if ENABLE(WEB_AUDIO)
+    static PassOwnPtr<AudioBus> loadPlatformAudioResource(const char* name, double sampleRate);
+    static PassOwnPtr<AudioBus> decodeAudioFileData(const char* data, size_t, double sampleRate);
+#endif
+
+    // Sandbox ------------------------------------------------------------
+    static bool sandboxEnabled();
+
+    // Screen -------------------------------------------------------------
+    static int screenDepth(Widget*);
+    static int screenDepthPerComponent(Widget*);
+    static bool screenIsMonochrome(Widget*);
+    static IntRect screenRect(Widget*);
+    static IntRect screenAvailableRect(Widget*);
+
+    // SharedTimers -------------------------------------------------------
+    static void setSharedTimerFiredFunction(void (*func)());
+    static void setSharedTimerFireTime(double);
+    static void stopSharedTimer();
+
+    // StatsCounters ------------------------------------------------------
+    static void decrementStatsCounter(const char* name);
+    static void incrementStatsCounter(const char* name);
+    static void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount);
+    static void histogramEnumeration(const char* name, int sample, int boundaryValue);
+
+    // Sudden Termination
+    static void suddenTerminationChanged(bool enabled);
+
+    // SystemTime ---------------------------------------------------------
+    static double currentTime();
+
+    // Theming ------------------------------------------------------------
+#if OS(WINDOWS)
+    static void paintButton(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&);
+    static void paintMenuList(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&);
+    static void paintScrollbarArrow(
+        GraphicsContext*, int state, int classicState, const IntRect&);
+    static void paintScrollbarThumb(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&);
+    static void paintScrollbarTrack(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&, const IntRect& alignRect);
+    static void paintSpinButton(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&);
+    static void paintTextField(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&, const Color&, bool fillContentArea, bool drawEdges);
+    static void paintTrackbar(
+        GraphicsContext*, int part, int state, int classicState, const IntRect&);
+    static void paintProgressBar(
+        GraphicsContext*, const IntRect& barRect, const IntRect& valueRect, bool determinate, double animatedSeconds);
+#elif OS(LINUX)
+    // The UI part which is being accessed.
+    enum ThemePart {
+        PartScrollbarDownArrow,
+        PartScrollbarLeftArrow,
+        PartScrollbarRightArrow,
+        PartScrollbarUpArrow,
+        PartScrollbarHorizontalThumb,
+        PartScrollbarVerticalThumb,
+        PartScrollbarHorizontalTrack,
+        PartScrollbarVerticalTrack,
+    };
+
+    // The current state of the associated Part.
+    enum ThemePaintState {
+        StateDisabled,
+        StateHover,
+        StateNormal,
+        StatePressed,
+    };
+
+    struct ScrollbarTrackExtraParams {
+        // The bounds of the entire track, as opposed to the part being painted.
+        int trackX;
+        int trackY;
+        int trackWidth;
+        int trackHeight;
+    };
+
+    union ThemePaintExtraParams {
+        ScrollbarTrackExtraParams scrollbarTrack;
+    };
+
+    // Gets the size of the given theme part. For variable sized items
+    // like vertical scrollbar thumbs, the width will be the required width of
+    // the track while the height will be the minimum height.
+    static IntSize getThemePartSize(ThemePart);
+    // Paint the given the given theme part.
+    static void paintThemePart(GraphicsContext*, ThemePart, ThemePaintState, const IntRect&, const ThemePaintExtraParams*);
+#elif OS(DARWIN)
+    enum ThemePaintState {
+        StateDisabled,
+        StateInactive,
+        StateActive,
+        StatePressed,
+    };
+
+    enum ThemePaintSize {
+        SizeRegular,
+        SizeSmall,
+    };
+
+    enum ThemePaintScrollbarOrientation {
+        ScrollbarOrientationHorizontal,
+        ScrollbarOrientationVertical,
+    };
+
+    enum ThemePaintScrollbarParent {
+        ScrollbarParentScrollView,
+        ScrollbarParentRenderLayer,
+    };
+
+    struct ThemePaintScrollbarInfo {
+        ThemePaintScrollbarOrientation orientation;
+        ThemePaintScrollbarParent parent;
+        int maxValue;
+        int currentValue;
+        int visibleSize;
+        int totalSize;
+    };
+
+    static void paintScrollbarThumb(GraphicsContext*, ThemePaintState, ThemePaintSize, const IntRect&, const ThemePaintScrollbarInfo&);
+#endif
+
+    // Trace Event --------------------------------------------------------
+    static void traceEventBegin(const char* name, void*, const char* extra);
+    static void traceEventEnd(const char* name, void*, const char* extra);
+
+    // Visited links ------------------------------------------------------
+    static LinkHash visitedLinkHash(const UChar* url, unsigned length);
+    static LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL);
+    static bool isLinkVisited(LinkHash);
+};
 
 } // namespace WebCore
 
-#endif // PlatformBridge_h
+#endif
index e659ef5..35d5018 100644 (file)
 #include "config.h"
 #include "PlatformScreen.h"
 
-#include "ChromiumBridge.h"
 #include "IntRect.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 int screenDepth(Widget* widget)
 {
-    return ChromiumBridge::screenDepth(widget);
+    return PlatformBridge::screenDepth(widget);
 }
 
 int screenDepthPerComponent(Widget* widget)
 {
-    return ChromiumBridge::screenDepthPerComponent(widget);
+    return PlatformBridge::screenDepthPerComponent(widget);
 }
 
 bool screenIsMonochrome(Widget* widget)
 {
-    return ChromiumBridge::screenIsMonochrome(widget);
+    return PlatformBridge::screenIsMonochrome(widget);
 }
 
 FloatRect screenRect(Widget* widget)
 {
-    return ChromiumBridge::screenRect(widget);
+    return PlatformBridge::screenRect(widget);
 }
 
 FloatRect screenAvailableRect(Widget* widget)
 {
-    return ChromiumBridge::screenAvailableRect(widget);
+    return PlatformBridge::screenAvailableRect(widget);
 }
 
 } // namespace WebCore
index 97c481b..dbf4739 100644 (file)
 #include "config.h"
 #include "ReadableDataObject.h"
 
-#include "ChromiumBridge.h"
 #include "ClipboardMimeTypes.h"
 #include "Pasteboard.h"
 #include "PasteboardPrivate.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -80,19 +80,19 @@ String ReadableDataObject::getData(const String& type, bool& succeeded) const
                 Pasteboard::generalPasteboard()->isSelectionMode() ?
                 PasteboardPrivate::SelectionBuffer :
                 PasteboardPrivate::StandardBuffer;
-            data = ChromiumBridge::clipboardReadPlainText(buffer);
+            data = PlatformBridge::clipboardReadPlainText(buffer);
         } else if (type == mimeTypeTextHTML) {
             PasteboardPrivate::ClipboardBuffer buffer =
                 Pasteboard::generalPasteboard()->isSelectionMode() ?
                 PasteboardPrivate::SelectionBuffer :
                 PasteboardPrivate::StandardBuffer;
             KURL ignoredSourceURL;
-            ChromiumBridge::clipboardReadHTML(buffer, &data, &ignoredSourceURL);
+            PlatformBridge::clipboardReadHTML(buffer, &data, &ignoredSourceURL);
         }
         succeeded = !data.isEmpty();
         return data;
     }
-    succeeded = ChromiumBridge::clipboardReadData(
+    succeeded = PlatformBridge::clipboardReadData(
         clipboardBuffer(m_clipboardType), type, data, ignoredMetadata);
     return data;
 }
@@ -101,7 +101,7 @@ String ReadableDataObject::urlTitle() const
 {
     String ignoredData;
     String urlTitle;
-    ChromiumBridge::clipboardReadData(
+    PlatformBridge::clipboardReadData(
         clipboardBuffer(m_clipboardType), mimeTypeTextURIList, ignoredData, urlTitle);
     return urlTitle;
 }
@@ -110,7 +110,7 @@ KURL ReadableDataObject::htmlBaseUrl() const
 {
     String ignoredData;
     String htmlBaseUrl;
-    ChromiumBridge::clipboardReadData(
+    PlatformBridge::clipboardReadData(
         clipboardBuffer(m_clipboardType), mimeTypeTextHTML, ignoredData, htmlBaseUrl);
     return KURL(ParsedURLString, htmlBaseUrl);
 }
@@ -123,7 +123,7 @@ bool ReadableDataObject::containsFilenames() const
 
 Vector<String> ReadableDataObject::filenames() const
 {
-    return ChromiumBridge::clipboardReadFilenames(clipboardBuffer(m_clipboardType));
+    return PlatformBridge::clipboardReadFilenames(clipboardBuffer(m_clipboardType));
 }
 
 void ReadableDataObject::ensureTypeCacheInitialized() const
@@ -131,7 +131,7 @@ void ReadableDataObject::ensureTypeCacheInitialized() const
     if (m_isTypeCacheInitialized)
         return;
 
-    m_types = ChromiumBridge::clipboardReadAvailableTypes(
+    m_types = PlatformBridge::clipboardReadAvailableTypes(
         clipboardBuffer(m_clipboardType), &m_containsFilenames);
     m_isTypeCacheInitialized = true;
 }
index 49d9517..6467764 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "SSLKeyGenerator.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "PlatformString.h"
 
 namespace WebCore {
@@ -51,7 +51,7 @@ String signedPublicKeyAndChallengeString(unsigned keySizeIndex,
                                          const String& challengeString,
                                          const KURL& url)
 {
-    return ChromiumBridge::signedPublicKeyAndChallengeString(keySizeIndex,
+    return PlatformBridge::signedPublicKeyAndChallengeString(keySizeIndex,
                                                              challengeString,
                                                              url);
 }
index 234d0ee..fe09553 100644 (file)
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "ScrollbarThemeChromium.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "PlatformMouseEvent.h"
 #include "Scrollbar.h"
 #include "ScrollbarClient.h"
index ba10953..e173dff 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "ScrollbarThemeChromiumLinux.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "PlatformMouseEvent.h"
 #include "Scrollbar.h"
 
@@ -46,22 +46,22 @@ ScrollbarTheme* ScrollbarTheme::nativeTheme()
 int ScrollbarThemeChromiumLinux::scrollbarThickness(ScrollbarControlSize controlSize)
 {
     // Horiz and Vert scrollbars are the same thickness.
-    IntSize scrollbarSize = ChromiumBridge::getThemePartSize(ChromiumBridge::PartScrollbarVerticalTrack);
+    IntSize scrollbarSize = PlatformBridge::getThemePartSize(PlatformBridge::PartScrollbarVerticalTrack);
     return scrollbarSize.width();
 }
 
 void ScrollbarThemeChromiumLinux::paintTrackPiece(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart partType)
 {
-    ChromiumBridge::ThemePaintState state = scrollbar->hoveredPart() == partType ? ChromiumBridge::StateHover : ChromiumBridge::StateNormal;
+    PlatformBridge::ThemePaintState state = scrollbar->hoveredPart() == partType ? PlatformBridge::StateHover : PlatformBridge::StateNormal;
     IntRect alignRect = trackRect(scrollbar, false);
-    ChromiumBridge::ThemePaintExtraParams extraParams;
+    PlatformBridge::ThemePaintExtraParams extraParams;
     extraParams.scrollbarTrack.trackX = alignRect.x();
     extraParams.scrollbarTrack.trackY = alignRect.y();
     extraParams.scrollbarTrack.trackWidth = alignRect.width();
     extraParams.scrollbarTrack.trackHeight = alignRect.height();
-    ChromiumBridge::paintThemePart(
+    PlatformBridge::paintThemePart(
         gc,
-        scrollbar->orientation() == HorizontalScrollbar ? ChromiumBridge::PartScrollbarHorizontalTrack : ChromiumBridge::PartScrollbarVerticalTrack,
+        scrollbar->orientation() == HorizontalScrollbar ? PlatformBridge::PartScrollbarHorizontalTrack : PlatformBridge::PartScrollbarVerticalTrack,
         state,
         rect,
         &extraParams);
@@ -69,52 +69,52 @@ void ScrollbarThemeChromiumLinux::paintTrackPiece(GraphicsContext* gc, Scrollbar
 
 void ScrollbarThemeChromiumLinux::paintButton(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
 {
-    ChromiumBridge::ThemePart paintPart;
-    ChromiumBridge::ThemePaintState state = ChromiumBridge::StateNormal;
+    PlatformBridge::ThemePart paintPart;
+    PlatformBridge::ThemePaintState state = PlatformBridge::StateNormal;
     bool checkMin = false;
     bool checkMax = false;
     if (scrollbar->orientation() == HorizontalScrollbar) {
         if (part == BackButtonStartPart) {
-            paintPart = ChromiumBridge::PartScrollbarLeftArrow;
+            paintPart = PlatformBridge::PartScrollbarLeftArrow;
             checkMin = true;
         } else {
-            paintPart = ChromiumBridge::PartScrollbarRightArrow;
+            paintPart = PlatformBridge::PartScrollbarRightArrow;
             checkMax = true;
         }
     } else {
         if (part == BackButtonStartPart) {
-            paintPart = ChromiumBridge::PartScrollbarUpArrow;
+            paintPart = PlatformBridge::PartScrollbarUpArrow;
             checkMin = true;
         } else {
-            paintPart = ChromiumBridge::PartScrollbarDownArrow;
+            paintPart = PlatformBridge::PartScrollbarDownArrow;
             checkMax = true;
         }
     }
     if ((checkMin && (scrollbar->currentPos() <= 0))
         || (checkMax && scrollbar->currentPos() == scrollbar->maximum())) {
-        state = ChromiumBridge::StateDisabled;
+        state = PlatformBridge::StateDisabled;
     } else {
         if (part == scrollbar->pressedPart())
-            state = ChromiumBridge::StatePressed;
+            state = PlatformBridge::StatePressed;
         else if (part == scrollbar->hoveredPart())
-            state = ChromiumBridge::StateHover;
+            state = PlatformBridge::StateHover;
     }
-    ChromiumBridge::paintThemePart(gc, paintPart, state, rect, 0);
+    PlatformBridge::paintThemePart(gc, paintPart, state, rect, 0);
 }
 
 void ScrollbarThemeChromiumLinux::paintThumb(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect)
 {
-    ChromiumBridge::ThemePaintState state;
+    PlatformBridge::ThemePaintState state;
 
     if (scrollbar->pressedPart() == ThumbPart)
-        state = ChromiumBridge::StatePressed;
+        state = PlatformBridge::StatePressed;
     else if (scrollbar->hoveredPart() == ThumbPart)
-        state = ChromiumBridge::StateHover;
+        state = PlatformBridge::StateHover;
     else
-        state = ChromiumBridge::StateNormal;
-    ChromiumBridge::paintThemePart(
+        state = PlatformBridge::StateNormal;
+    PlatformBridge::paintThemePart(
         gc,
-        scrollbar->orientation() == HorizontalScrollbar ? ChromiumBridge::PartScrollbarHorizontalThumb : ChromiumBridge::PartScrollbarVerticalThumb,
+        scrollbar->orientation() == HorizontalScrollbar ? PlatformBridge::PartScrollbarHorizontalThumb : PlatformBridge::PartScrollbarVerticalThumb,
         state,
         rect,
         0);
@@ -128,23 +128,23 @@ bool ScrollbarThemeChromiumLinux::shouldCenterOnThumb(Scrollbar*, const Platform
 IntSize ScrollbarThemeChromiumLinux::buttonSize(Scrollbar* scrollbar)
 {
     if (scrollbar->orientation() == VerticalScrollbar) {
-        IntSize size = ChromiumBridge::getThemePartSize(ChromiumBridge::PartScrollbarUpArrow);
+        IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartScrollbarUpArrow);
         return IntSize(size.width(), scrollbar->height() < 2 * size.height() ? scrollbar->height() / 2 : size.height());
     }
 
     // HorizontalScrollbar
-    IntSize size = ChromiumBridge::getThemePartSize(ChromiumBridge::PartScrollbarLeftArrow);
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartScrollbarLeftArrow);
     return IntSize(scrollbar->width() < 2 * size.width() ? scrollbar->width() / 2 : size.width(), size.height());
 }
 
 int ScrollbarThemeChromiumLinux::minimumThumbLength(Scrollbar* scrollbar)
 {
     if (scrollbar->orientation() == VerticalScrollbar) {
-        IntSize size = ChromiumBridge::getThemePartSize(ChromiumBridge::PartScrollbarVerticalThumb);
+        IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartScrollbarVerticalThumb);
         return size.height();
     }
 
-    IntSize size = ChromiumBridge::getThemePartSize(ChromiumBridge::PartScrollbarHorizontalThumb);
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartScrollbarHorizontalThumb);
     return size.width();
 }
 
index 0aa3e10..0f49297 100644 (file)
@@ -27,9 +27,9 @@
 #include "config.h"
 #include "ScrollbarThemeChromiumMac.h"
 
-#include "ChromiumBridge.h"
 #include "FrameView.h"
 #include "ImageBuffer.h"
+#include "PlatformBridge.h"
 #include "PlatformMouseEvent.h"
 #include "ScrollView.h"
 #include <Carbon/Carbon.h>
@@ -370,15 +370,15 @@ static int scrollbarPartToHIPressedState(ScrollbarPart part)
     }
 }
 
-static ChromiumBridge::ThemePaintState scrollbarStateToThemeState(Scrollbar* scrollbar) {
+static PlatformBridge::ThemePaintState scrollbarStateToThemeState(Scrollbar* scrollbar) {
     if (!scrollbar->enabled())
-        return ChromiumBridge::StateDisabled;
+        return PlatformBridge::StateDisabled;
     if (!scrollbar->client()->isActive())
-        return ChromiumBridge::StateInactive;
+        return PlatformBridge::StateInactive;
     if (scrollbar->pressedPart() == ThumbPart)
-        return ChromiumBridge::StatePressed;
+        return PlatformBridge::StatePressed;
 
-    return ChromiumBridge::StateActive;
+    return PlatformBridge::StateActive;
 }
 
 bool ScrollbarThemeChromiumMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
@@ -463,18 +463,18 @@ bool ScrollbarThemeChromiumMac::paint(Scrollbar* scrollbar, GraphicsContext* con
     }
 
     if (hasThumb(scrollbar)) {
-        ChromiumBridge::ThemePaintScrollbarInfo scrollbarInfo;
-        scrollbarInfo.orientation = scrollbar->orientation() == HorizontalScrollbar ? ChromiumBridge::ScrollbarOrientationHorizontal : ChromiumBridge::ScrollbarOrientationVertical;
-        scrollbarInfo.parent = scrollbar->parent() && scrollbar->parent()->isFrameView() && static_cast<FrameView*>(scrollbar->parent())->isScrollViewScrollbar(scrollbar) ? ChromiumBridge::ScrollbarParentScrollView : ChromiumBridge::ScrollbarParentRenderLayer;
+        PlatformBridge::ThemePaintScrollbarInfo scrollbarInfo;
+        scrollbarInfo.orientation = scrollbar->orientation() == HorizontalScrollbar ? PlatformBridge::ScrollbarOrientationHorizontal : PlatformBridge::ScrollbarOrientationVertical;
+        scrollbarInfo.parent = scrollbar->parent() && scrollbar->parent()->isFrameView() && static_cast<FrameView*>(scrollbar->parent())->isScrollViewScrollbar(scrollbar) ? PlatformBridge::ScrollbarParentScrollView : PlatformBridge::ScrollbarParentRenderLayer;
         scrollbarInfo.maxValue = scrollbar->maximum();
         scrollbarInfo.currentValue = scrollbar->currentPos();
         scrollbarInfo.visibleSize = scrollbar->visibleSize();
         scrollbarInfo.totalSize = scrollbar->totalSize();
 
-        ChromiumBridge::paintScrollbarThumb(
+        PlatformBridge::paintScrollbarThumb(
             drawingContext,
             scrollbarStateToThemeState(scrollbar),
-            scrollbar->controlSize() == RegularScrollbar ? ChromiumBridge::SizeRegular : ChromiumBridge::SizeSmall,
+            scrollbar->controlSize() == RegularScrollbar ? PlatformBridge::SizeRegular : PlatformBridge::SizeSmall,
             scrollbar->frameRect(),
             scrollbarInfo);
     }
index ba7e97b..29e8b44 100644 (file)
@@ -30,8 +30,8 @@
 #include <windows.h>
 #include <vsstyle.h>
 
-#include "ChromiumBridge.h"
 #include "GraphicsContext.h"
+#include "PlatformBridge.h"
 #include "PlatformContextSkia.h"
 #include "PlatformMouseEvent.h"
 #include "Scrollbar.h"
@@ -61,7 +61,7 @@ int ScrollbarThemeChromiumWin::scrollbarThickness(ScrollbarControlSize controlSi
 {
     static int thickness;
     if (!thickness) {
-        if (ChromiumBridge::layoutTestMode())
+        if (PlatformBridge::layoutTestMode())
             return kMacScrollbarSize[controlSize];
         thickness = GetSystemMetrics(SM_CXVSCROLL);
     }
@@ -104,7 +104,7 @@ void ScrollbarThemeChromiumWin::paintTrackPiece(GraphicsContext* gc, Scrollbar*
     IntRect alignRect = trackRect(scrollbar, false);
 
     // Draw the track area before/after the thumb on the scroll bar.
-    ChromiumBridge::paintScrollbarTrack(
+    PlatformBridge::paintScrollbarTrack(
         gc,
         partId,
         getThemeState(scrollbar, partType),
@@ -124,7 +124,7 @@ void ScrollbarThemeChromiumWin::paintButton(GraphicsContext* gc, Scrollbar* scro
         partId = horz ? DFCS_SCROLLRIGHT : DFCS_SCROLLDOWN;
 
     // Draw the thumb (the box you drag in the scroll bar to scroll).
-    ChromiumBridge::paintScrollbarArrow(
+    PlatformBridge::paintScrollbarArrow(
         gc,
         getThemeArrowState(scrollbar, part),
         partId | getClassicThemeState(scrollbar, part),
@@ -136,7 +136,7 @@ void ScrollbarThemeChromiumWin::paintThumb(GraphicsContext* gc, Scrollbar* scrol
     bool horz = scrollbar->orientation() == HorizontalScrollbar;
 
     // Draw the thumb (the box you drag in the scroll bar to scroll).
-    ChromiumBridge::paintScrollbarThumb(
+    PlatformBridge::paintScrollbarThumb(
         gc,
         horz ? SBP_THUMBBTNHORZ : SBP_THUMBBTNVERT,
         getThemeState(scrollbar, ThumbPart),
@@ -144,7 +144,7 @@ void ScrollbarThemeChromiumWin::paintThumb(GraphicsContext* gc, Scrollbar* scrol
         rect);
 
     // Draw the gripper (the three little lines on the thumb).
-    ChromiumBridge::paintScrollbarThumb(
+    PlatformBridge::paintScrollbarThumb(
         gc,
         horz ? SBP_GRIPPERHORZ : SBP_GRIPPERVERT,
         getThemeState(scrollbar, ThumbPart),
@@ -256,7 +256,7 @@ IntSize ScrollbarThemeChromiumWin::buttonSize(Scrollbar* scrollbar)
     // test mode so that should be enough to result in repeatable results, but
     // preserving this hack avoids having to rebaseline pixel tests.
     const int kLayoutTestModeGirth = 17;
-    int girth = ChromiumBridge::layoutTestMode() ? kLayoutTestModeGirth : thickness;
+    int girth = PlatformBridge::layoutTestMode() ? kLayoutTestModeGirth : thickness;
 
     if (scrollbar->orientation() == HorizontalScrollbar) {
         int width = scrollbar->width() < 2 * girth ? scrollbar->width() / 2 : girth;
index 5a6a000..5acb253 100644 (file)
 #include "config.h"
 #include "SharedTimer.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 void setSharedTimerFiredFunction(void (*f)())
 {                   
-    ChromiumBridge::setSharedTimerFiredFunction(f);
+    PlatformBridge::setSharedTimerFiredFunction(f);
 }
 
 void setSharedTimerFireTime(double fireTime)
 {
-    ChromiumBridge::setSharedTimerFireTime(fireTime);
+    PlatformBridge::setSharedTimerFireTime(fireTime);
 }
 
 void stopSharedTimer()
 {
-    ChromiumBridge::stopSharedTimer();
+    PlatformBridge::stopSharedTimer();
 }
 
 } // namespace WebCore
index 54b8304..06cc738 100644 (file)
@@ -1,48 +1,48 @@
-/*\r
- * Copyright (C) 2009 Google Inc. All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are\r
- * met:\r
- *\r
- *     * Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- *     * Redistributions in binary form must reproduce the above\r
- * copyright notice, this list of conditions and the following disclaimer\r
- * in the documentation and/or other materials provided with the\r
- * distribution.\r
- *     * Neither the name of Google Inc. nor the names of its\r
- * contributors may be used to endorse or promote products derived from\r
- * this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-#include "config.h"\r
-#include "SuddenTermination.h"\r
-\r
-#include "ChromiumBridge.h"\r
-\r
-namespace WebCore {\r
-\r
-void disableSuddenTermination()\r
-{\r
-    ChromiumBridge::suddenTerminationChanged(false);\r
-}\r
-\r
-void enableSuddenTermination()\r
-{\r
-    ChromiumBridge::suddenTerminationChanged(true);\r
-}\r
-\r
-} // namespace WebCore\r
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SuddenTermination.h"
+
+#include "PlatformBridge.h"
+
+namespace WebCore {
+
+void disableSuddenTermination()
+{
+    PlatformBridge::suddenTerminationChanged(false);
+}
+
+void enableSuddenTermination()
+{
+    PlatformBridge::suddenTerminationChanged(true);
+}
+
+} // namespace WebCore
index 52ac262..93ac8b1 100644 (file)
 #include "config.h"
 #include "SystemTime.h"
 
-#include "ChromiumBridge.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 // Get the current time in seconds since epoch.
 double currentTime()
 {
-    return ChromiumBridge::currentTime();
+    return PlatformBridge::currentTime();
 }
 
 float userIdleTime()
index 7cbf42c..a1ac7d9 100644 (file)
@@ -31,8 +31,8 @@
 #include "config.h"
 #include "WritableDataObject.h"
 
-#include "ChromiumBridge.h"
 #include "ClipboardMimeTypes.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -80,7 +80,7 @@ bool WritableDataObject::setData(const String& type, const String& data)
         // FIXME: This is currently unimplemented on the Chromium-side. This is
         // "okay" for now since the original implementation didn't support it
         // anyway. Going forward, this is something we'll need to fix though.
-        ChromiumBridge::clipboardWriteData(type, data, "");
+        PlatformBridge::clipboardWriteData(type, data, "");
         return true;
     }
     m_dataMap.set(type, data);
index 72e3369..227fbe4 100644 (file)
@@ -30,7 +30,7 @@
 #import "CrossProcessFontLoading.h"
 
 #import "../graphics/cocoa/FontPlatformData.h"
-#import "ChromiumBridge.h"
+#import "PlatformBridge.h"
 #import <AppKit/NSFont.h>
 #import <wtf/HashMap.h>
 
@@ -87,7 +87,7 @@ PassRefPtr<MemoryActivatedFont> loadFontFromBrowserProcess(NSFont* nsFont)
 {
     ATSFontContainerRef container;
     // Send cross-process request to load font.
-    if (!ChromiumBridge::loadFont(nsFont, &container))
+    if (!PlatformBridge::loadFont(nsFont, &container))
         return 0;
     
     ATSFontContainerRef srcFontContainerRef = fontContainerRefFromNSFont(nsFont);
index 2c79815..f4c0dee 100644 (file)
 #include "config.h"
 #include "FontCache.h"
 
-#include "ChromiumBridge.h"
 #include "Font.h"
 #include "FontUtilsChromiumWin.h"
 #include "HashMap.h"
 #include "HashSet.h"
+#include "PlatformBridge.h"
 #include "SimpleFontData.h"
 #include <unicode/uniset.h>
 #include <wtf/text/StringHash.h>
@@ -288,9 +288,9 @@ static bool fontContainsCharacter(const FontPlatformData* fontData,
     HDC hdc = GetDC(0);
     HGDIOBJ oldFont = static_cast<HFONT>(SelectObject(hdc, hfont));
     int count = GetFontUnicodeRanges(hdc, 0);
-    if (count == 0 && ChromiumBridge::ensureFontLoaded(hfont))
+    if (!count && PlatformBridge::ensureFontLoaded(hfont))
         count = GetFontUnicodeRanges(hdc, 0);
-    if (count == 0) {
+    if (!count) {
         LOG_ERROR("Unable to get the font unicode range after second attempt");
         SelectObject(hdc, oldFont);
         ReleaseDC(0, hdc);
@@ -362,7 +362,7 @@ static void FillLogFont(const FontDescription& fontDescription, LOGFONT* winfont
     winfont->lfStrikeOut = false;
     winfont->lfCharSet = DEFAULT_CHARSET;
     winfont->lfOutPrecision = OUT_TT_ONLY_PRECIS;
-    winfont->lfQuality = ChromiumBridge::layoutTestMode() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY; // Honor user's desktop settings.
+    winfont->lfQuality = PlatformBridge::layoutTestMode() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY; // Honor user's desktop settings.
     winfont->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
     winfont->lfItalic = fontDescription.italic();
     winfont->lfWeight = toGDIFontWeight(fontDescription.weight());
index bd33927..a849a6c 100644 (file)
 #include "config.h"
 #include "FontCache.h"
 
-#include "ChromiumBridge.h"
 #include "Font.h"
 #include "FontDescription.h"
 #include "FontPlatformData.h"
 #include "Logging.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 #include "SimpleFontData.h"
 
 #include "SkPaint.h"
@@ -57,7 +57,7 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font,
                                                           const UChar* characters,
                                                           int length)
 {
-    String family = ChromiumBridge::getFontFamilyForCharacters(characters, length);
+    String family = PlatformBridge::getFontFamilyForCharacters(characters, length);
     if (family.isEmpty())
         return 0;
 
index 1a00833..5da4d5a 100644 (file)
 #include "config.h"
 #include "Font.h"
 
-#include "ChromiumBridge.h"
 #include "FontFallbackList.h"
 #include "GlyphBuffer.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 #include "PlatformContextSkia.h"
 #include "SimpleFontData.h"
 #include "SkiaFontWin.h"
@@ -424,7 +424,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext,
             success = painter.drawGlyphs(curLen, &glyphs[0], &advances[0], curAdvance);
             if (!success && executions == 0) {
                 // Ask the browser to load the font for us and retry.
-                ChromiumBridge::ensureFontLoaded(font->platformData().hfont());
+                PlatformBridge::ensureFontLoaded(font->platformData().hfont());
                 continue;
             }
             break;
index d6c83ec..1022a9f 100644 (file)
@@ -36,7 +36,7 @@
 #include <objidl.h>
 #include <mlang.h>
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "SkiaFontWin.h"
 
 namespace WebCore {
@@ -136,7 +136,7 @@ SCRIPT_FONTPROPERTIES* FontPlatformData::scriptFontProperties() const
             HRESULT hr = ScriptGetFontProperties(dc, scriptCache(),
                                                  m_scriptFontProperties);
             if (S_OK != hr) {
-                if (ChromiumBridge::ensureFontLoaded(hfont())) {
+                if (PlatformBridge::ensureFontLoaded(hfont())) {
                     // FIXME: Handle gracefully the error if this call also fails.
                     hr = ScriptGetFontProperties(dc, scriptCache(),
                                                  m_scriptFontProperties);
index 42942cc..a1ea012 100644 (file)
@@ -31,9 +31,9 @@
 #include "config.h"
 #include "FontPlatformData.h"
 
-#include "ChromiumBridge.h"
 #include "HarfbuzzSkia.h"
 #include "NotImplemented.h"
+#include "PlatformBridge.h"
 #include "PlatformString.h"
 
 #include "SkPaint.h"
@@ -229,7 +229,7 @@ void FontPlatformData::querySystemForRenderStyle()
         return;
     }
 
-    ChromiumBridge::getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typeface->style() & 3), &m_style);
+    PlatformBridge::getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typeface->style() & 3), &m_style);
 }
 
 }  // namespace WebCore
index e71f66a..ee2b5ab 100644 (file)
@@ -32,9 +32,9 @@
 #include <windows.h>
 #include <vector>
 
-#include "ChromiumBridge.h"
 #include "Font.h"
 #include "GlyphPageTreeNode.h"
+#include "PlatformBridge.h"
 #include "SimpleFontData.h"
 #include "UniscribeHelperTextRun.h"
 #include "WindowsVersion.h"
@@ -80,12 +80,11 @@ static bool fillBMPGlyphs(unsigned offset,
         ReleaseDC(0, dc);
 
         if (recurse) {
-            if (ChromiumBridge::ensureFontLoaded(fontData->platformData().hfont()))
+            if (PlatformBridge::ensureFontLoaded(fontData->platformData().hfont()))
                 return fillBMPGlyphs(offset, length, buffer, page, fontData, false);
-            else {
-                fillEmptyGlyphs(page);
-                return false;
-            }
+
+            fillEmptyGlyphs(page);
+            return false;
         } else {
             // FIXME: Handle gracefully the error if this call also fails.
             // See http://crbug.com/6401
index e90d566..e2b6f7a 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "Image.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -39,7 +39,7 @@ namespace WebCore {
 
 PassRefPtr<Image> Image::loadPlatformResource(const char *name)
 {
-    return ChromiumBridge::loadPlatformImageResource(name);
+    return PlatformBridge::loadPlatformImageResource(name);
 }
 
 } // namespace WebCore
index 073a409..f003894 100644 (file)
 #include "config.h"
 #include "BitmapImage.h"
 
-#include "ChromiumBridge.h"
 #include "Image.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 PassRefPtr<Image> Image::loadPlatformResource(const char* name)
 {
-    return ChromiumBridge::loadPlatformImageResource(name);
+    return PlatformBridge::loadPlatformImageResource(name);
 }
 
 // FIXME: These are temporary stubs, we need real implementations which
index 204c565..c23c586 100644 (file)
 #include "config.h"
 #include "SimpleFontData.h"
 
-#include "ChromiumBridge.h"
+#include "FloatRect.h"
 #include "Font.h"
 #include "FontCache.h"
-#include "FloatRect.h"
 #include "FontDescription.h"
+#include "PlatformBridge.h"
 #include <wtf/MathExtras.h>
 
 #include <unicode/uchar.h>
@@ -70,7 +70,7 @@ void SimpleFontData::platformInit()
 
     TEXTMETRIC textMetric = {0};
     if (!GetTextMetrics(dc, &textMetric)) {
-        if (ChromiumBridge::ensureFontLoaded(m_platformData.hfont())) {
+        if (PlatformBridge::ensureFontLoaded(m_platformData.hfont())) {
             // Retry GetTextMetrics.
             // FIXME: Handle gracefully the error if this call also fails.
             // See http://crbug.com/6401.
@@ -159,7 +159,7 @@ void SimpleFontData::determinePitch()
     // is *not* fixed pitch.  Unbelievable but true.
     TEXTMETRIC textMetric = {0};
     if (!GetTextMetrics(dc, &textMetric)) {
-        if (ChromiumBridge::ensureFontLoaded(m_platformData.hfont())) {
+        if (PlatformBridge::ensureFontLoaded(m_platformData.hfont())) {
             // Retry GetTextMetrics.
             // FIXME: Handle gracefully the error if this call also fails.
             // See http://crbug.com/6401.
@@ -190,7 +190,7 @@ float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
     int width = 0;
     if (!GetCharWidthI(dc, glyph, 1, 0, &width)) {
         // Ask the browser to preload the font and retry.
-        if (ChromiumBridge::ensureFontLoaded(m_platformData.hfont())) {
+        if (PlatformBridge::ensureFontLoaded(m_platformData.hfont())) {
             // FIXME: Handle gracefully the error if this call also fails.
             // See http://crbug.com/6401.
             if (!GetCharWidthI(dc, glyph, 1, 0, &width))
index 84a08fc..aa18b4a 100644 (file)
@@ -31,8 +31,8 @@
 #include "config.h"
 #include "UniscribeHelperTextRun.h"
 
-#include "ChromiumBridge.h"
 #include "Font.h"
+#include "PlatformBridge.h"
 #include "SimpleFontData.h"
 #include "TextRun.h"
 
@@ -80,7 +80,7 @@ void UniscribeHelperTextRun::tryToPreloadFont(HFONT font)
     // Ask the browser to get the font metrics for this font.
     // That will preload the font and it should now be accessible
     // from the renderer.
-    ChromiumBridge::ensureFontLoaded(font);
+    PlatformBridge::ensureFontLoaded(font);
 }
 
 bool UniscribeHelperTextRun::nextWinFontData(
index e94c417..0b31dfa 100644 (file)
@@ -35,8 +35,8 @@
 
 #if OS(WINDOWS)
 #include "Base64.h"
-#include "ChromiumBridge.h"
 #include "OpenTypeUtilities.h"
+#include "PlatformBridge.h"
 #elif OS(LINUX) || OS(FREEBSD) || PLATFORM(BREWMP)
 #include "SkStream.h"
 #endif
@@ -91,7 +91,7 @@ FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, b
     logFont.lfStrikeOut = false;
     logFont.lfCharSet = DEFAULT_CHARSET;
     logFont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
-    logFont.lfQuality = ChromiumBridge::layoutTestMode() ?
+    logFont.lfQuality = PlatformBridge::layoutTestMode() ?
                         NONANTIALIASED_QUALITY :
                         DEFAULT_QUALITY; // Honor user's desktop settings.
     logFont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
index e17816a..2f2489b 100644 (file)
 #include "CookieJar.h"
 
 #include "Cookie.h"
-#include "ChromiumBridge.h"
 #include "Document.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 void setCookies(Document* document, const KURL& url, const String& value)
 {
-    ChromiumBridge::setCookies(document, url, value);
+    PlatformBridge::setCookies(document, url, value);
 }
 
 String cookies(const Document* document, const KURL& url)
 {
-    return ChromiumBridge::cookies(document, url);
+    return PlatformBridge::cookies(document, url);
 }
 
 String cookieRequestHeaderFieldValue(const Document* document, const KURL& url)
 {
-    return ChromiumBridge::cookieRequestHeaderFieldValue(document, url);
+    return PlatformBridge::cookieRequestHeaderFieldValue(document, url);
 }
 
 bool cookiesEnabled(const Document* document)
 {
-    return ChromiumBridge::cookiesEnabled(document);
+    return PlatformBridge::cookiesEnabled(document);
 }
 
 bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies)
 {
-    return ChromiumBridge::rawCookies(document, url, rawCookies);
+    return PlatformBridge::rawCookies(document, url, rawCookies);
 }
 
 void deleteCookie(const Document* document, const KURL& url, const String& cookieName)
 {
-    return ChromiumBridge::deleteCookie(document, url, cookieName);
+    return PlatformBridge::deleteCookie(document, url, cookieName);
 }
 
 } // namespace WebCore
index 21fcd46..7b9eac5 100644 (file)
 #include "config.h"
 #include "DNS.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "ResourceHandle.h"
 
 namespace WebCore {
 
 void prefetchDNS(const String& hostname)
 {
-    ChromiumBridge::prefetchDNS(hostname);
+    PlatformBridge::prefetchDNS(hostname);
 }
 
 void ResourceHandle::prepareForURL(const KURL& url)
index e478d8f..9647507 100644 (file)
@@ -86,7 +86,7 @@ class Widget;
 
 // An interface to the embedding layer, which has the ability to answer
 // questions about the system and so on...
-// This is very similar to ChromiumBridge and the two are likely to converge
+// This is very similar to chromium/PlatformBridge and the two are likely to converge
 // in the future.
 class PlatformBridge {
 public:
index 0a09888..b79eb1a 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "SQLiteFileSystem.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "SQLiteDatabase.h"
 #include <sqlite3.h>
 #include <wtf/text/CString.h>
@@ -92,12 +92,12 @@ bool SQLiteFileSystem::deleteEmptyDatabaseDirectory(const String&)
 
 bool SQLiteFileSystem::deleteDatabaseFile(const String& fileName)
 {
-    return (ChromiumBridge::databaseDeleteFile(fileName) == SQLITE_OK);
+    return (PlatformBridge::databaseDeleteFile(fileName) == SQLITE_OK);
 }
 
 long long SQLiteFileSystem::getDatabaseFileSize(const String& fileName)
 {
-    return ChromiumBridge::databaseGetFileSize(fileName);
+    return PlatformBridge::databaseGetFileSize(fileName);
 }
 
 } // namespace WebCore
index 1102df5..37f96be 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "SQLiteFileSystem.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include <sqlite3.h>
 
 #include <errno.h>
@@ -996,10 +996,10 @@ static int chromiumOpen(sqlite3_vfs* vfs, const char* fileName,
     }
 
     if (fd < 0) {
-        fd = ChromiumBridge::databaseOpenFile(fileName, desiredFlags);
+        fd = PlatformBridge::databaseOpenFile(fileName, desiredFlags);
         if ((fd < 0) && (desiredFlags & SQLITE_OPEN_READWRITE)) {
             int newFlags = (desiredFlags & ~(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)) | SQLITE_OPEN_READONLY;
-            fd = ChromiumBridge::databaseOpenFile(fileName, newFlags);
+            fd = PlatformBridge::databaseOpenFile(fileName, newFlags);
         }
     }
     if (fd < 0) {
@@ -1031,7 +1031,7 @@ static int chromiumOpen(sqlite3_vfs* vfs, const char* fileName,
 //           should be synched after the file is deleted.
 static int chromiumDelete(sqlite3_vfs*, const char* fileName, int syncDir)
 {
-    return ChromiumBridge::databaseDeleteFile(fileName, syncDir);
+    return PlatformBridge::databaseDeleteFile(fileName, syncDir);
 }
 
 // Check the existance and status of the given file.
@@ -1042,7 +1042,7 @@ static int chromiumDelete(sqlite3_vfs*, const char* fileName, int syncDir)
 // res - the result.
 static int chromiumAccess(sqlite3_vfs*, const char* fileName, int flag, int* res)
 {
-    int attr = static_cast<int>(ChromiumBridge::databaseGetFileAttributes(fileName));
+    int attr = static_cast<int>(PlatformBridge::databaseGetFileAttributes(fileName));
     if (attr < 0) {
         *res = 0;
         return SQLITE_OK;
index d846af7..47e01d0 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "SQLiteFileSystem.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include <sqlite3.h>
 #include <windows.h>
 
@@ -55,7 +55,7 @@ namespace {
 int chromiumOpen(sqlite3_vfs*, const char* fileName,
                  sqlite3_file* id, int desiredFlags, int* usedFlags)
 {
-    HANDLE h = ChromiumBridge::databaseOpenFile(fileName, desiredFlags);
+    HANDLE h = PlatformBridge::databaseOpenFile(fileName, desiredFlags);
     if (h == INVALID_HANDLE_VALUE) {
         if (desiredFlags & SQLITE_OPEN_READWRITE) {
             int newFlags = (desiredFlags | SQLITE_OPEN_READONLY) & ~SQLITE_OPEN_READWRITE;
@@ -82,7 +82,7 @@ int chromiumOpen(sqlite3_vfs*, const char* fileName,
 //           should be synched after the file is deleted.
 int chromiumDelete(sqlite3_vfs*, const char* fileName, int)
 {
-    return ChromiumBridge::databaseDeleteFile(fileName);
+    return PlatformBridge::databaseDeleteFile(fileName);
 }
 
 // Check the existance and status of the given file.
@@ -93,7 +93,7 @@ int chromiumDelete(sqlite3_vfs*, const char* fileName, int)
 // res - the result.
 int chromiumAccess(sqlite3_vfs*, const char* fileName, int flag, int* res)
 {
-    DWORD attr = ChromiumBridge::databaseGetFileAttributes(fileName);
+    DWORD attr = PlatformBridge::databaseGetFileAttributes(fileName);
     switch (flag) {
     case SQLITE_ACCESS_READ:
     case SQLITE_ACCESS_EXISTS:
index c924063..77cdbbf 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "PluginDataChromium.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -50,7 +50,7 @@ public:
     const Vector<PluginInfo>& plugins()
     {
         if (!m_loaded) {
-            ChromiumBridge::plugins(m_refresh, &m_plugins);
+            PlatformBridge::plugins(m_refresh, &m_plugins);
             m_loaded = true;
             m_refresh = false;
         }
index 02eb134..10285ac 100644 (file)
@@ -20,8 +20,8 @@
 
 #import "config.h"
 #import "RenderThemeChromiumMac.h"
-#import "ChromiumBridge.h"
 #import "PaintInfo.h"
+#import "PlatformBridge.h"
 #import "RenderMediaControlsChromium.h"
 #import "UserAgentStyleSheets.h"
 #import <Carbon/Carbon.h>
@@ -71,7 +71,7 @@ PassRefPtr<RenderTheme> RenderThemeChromiumMac::create()
 
 bool RenderThemeChromiumMac::usesTestModeFocusRingColor() const
 {
-    return ChromiumBridge::layoutTestMode();
+    return PlatformBridge::layoutTestMode();
 }
 
 NSView* RenderThemeChromiumMac::documentViewFor(RenderObject*) const
index bb60c1f..1457766 100644 (file)
@@ -24,7 +24,6 @@
 #include "config.h"
 #include "RenderThemeChromiumSkia.h"
 
-#include "ChromiumBridge.h"
 #include "CSSValueKeywords.h"
 #include "CurrentTime.h"
 #include "GraphicsContext.h"
@@ -33,6 +32,7 @@
 #include "Image.h"
 #include "MediaControlElements.h"
 #include "PaintInfo.h"
+#include "PlatformBridge.h"
 #include "PlatformContextSkia.h"
 #include "RenderBox.h"
 #include "RenderMediaControlsChromium.h"
@@ -185,7 +185,7 @@ double RenderThemeChromiumSkia::caretBlinkInterval() const
 {
     // Disable the blinking caret in layout test mode, as it introduces
     // a race condition for the pixel tests. http://b/1198440
-    if (ChromiumBridge::layoutTestMode())
+    if (PlatformBridge::layoutTestMode())
         return 0;
 
     return caretBlinkIntervalInternal();
index 572aa2f..bba0520 100644 (file)
@@ -30,7 +30,6 @@
 #include <vssym32.h>
 
 #include "CSSValueKeywords.h"
-#include "ChromiumBridge.h"
 #include "CurrentTime.h"
 #include "FontSelector.h"
 #include "FontUtilsChromiumWin.h"
@@ -39,6 +38,7 @@
 #include "HTMLNames.h"
 #include "MediaControlElements.h"
 #include "PaintInfo.h"
+#include "PlatformBridge.h"
 #include "RenderBox.h"
 #include "RenderProgress.h"
 #include "RenderSlider.h"
@@ -238,7 +238,7 @@ bool RenderThemeChromiumWin::supportsFocusRing(const RenderStyle* style) const
 
 Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
 {
-    if (ChromiumBridge::layoutTestMode())
+    if (PlatformBridge::layoutTestMode())
         return Color(0x00, 0x00, 0xff); // Royal blue.
     COLORREF color = GetSysColor(COLOR_HIGHLIGHT);
     return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -246,7 +246,7 @@ Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
 
 Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
 {
-    if (ChromiumBridge::layoutTestMode())
+    if (PlatformBridge::layoutTestMode())
         return Color(0x99, 0x99, 0x99); // Medium gray.
     COLORREF color = GetSysColor(COLOR_GRAYTEXT);
     return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -254,7 +254,7 @@ Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
 
 Color RenderThemeChromiumWin::platformActiveSelectionForegroundColor() const
 {
-    if (ChromiumBridge::layoutTestMode())
+    if (PlatformBridge::layoutTestMode())
         return Color(0xff, 0xff, 0xcc); // Pale yellow.
     COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT);
     return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -375,7 +375,7 @@ static int cssValueIdToSysColorIndex(int cssValueId)
 Color RenderThemeChromiumWin::systemColor(int cssValueId) const
 {
     int sysColorIndex = cssValueIdToSysColorIndex(cssValueId);
-    if (ChromiumBridge::layoutTestMode() || (sysColorIndex == -1))
+    if (PlatformBridge::layoutTestMode() || (sysColorIndex == -1))
         return RenderTheme::systemColor(cssValueId);
 
     COLORREF color = GetSysColor(sysColorIndex);
@@ -411,7 +411,7 @@ bool RenderThemeChromiumWin::paintButton(RenderObject* o, const PaintInfo& i, co
     const ThemeData& themeData = getThemeData(o);
 
     ThemePainter painter(i.context, r);
-    ChromiumBridge::paintButton(painter.context(),
+    PlatformBridge::paintButton(painter.context(),
                                 themeData.m_part,
                                 themeData.m_state,
                                 themeData.m_classicState,
@@ -429,7 +429,7 @@ bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo&
     const ThemeData& themeData = getThemeData(o);
 
     ThemePainter painter(i.context, r);
-    ChromiumBridge::paintTrackbar(painter.context(),
+    PlatformBridge::paintTrackbar(painter.context(),
                                   themeData.m_part,
                                   themeData.m_state,
                                   themeData.m_classicState,
@@ -444,7 +444,7 @@ bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo&
 
 static int menuListButtonWidth()
 {
-    static int width = ChromiumBridge::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);
+    static int width = PlatformBridge::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);
     return width;
 }
 
@@ -492,7 +492,7 @@ bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i,
 
     // Get the correct theme data for a textfield and paint the menu.
     ThemePainter painter(i.context, rect);
-    ChromiumBridge::paintMenuList(painter.context(),
+    PlatformBridge::paintMenuList(painter.context(),
                                   CP_DROPDOWNBUTTON,
                                   determineState(o),
                                   determineClassicState(o),
@@ -657,7 +657,7 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
                                                     bool drawEdges)
 {
     // Fallback to white if the specified color object is invalid.
-    // (Note ChromiumBridge::paintTextField duplicates this check).
+    // (Note PlatformBridge::paintTextField duplicates this check).
     Color backgroundColor(Color::white);
     if (o->style()->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
         backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor);
@@ -681,7 +681,7 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
     {
         const ThemeData& themeData = getThemeData(o);
         ThemePainter painter(i.context, r);
-        ChromiumBridge::paintTextField(painter.context(),
+        PlatformBridge::paintTextField(painter.context(),
                                        themeData.m_part,
                                        themeData.m_state,
                                        themeData.m_classicState,
@@ -710,7 +710,7 @@ bool RenderThemeChromiumWin::paintInnerSpinButton(RenderObject* object, const Pa
     half.setHeight(rect.height() / 2);
     const ThemeData& upThemeData = getThemeData(object, SpinButtonUp);
     ThemePainter upPainter(info.context, half);
-    ChromiumBridge::paintSpinButton(upPainter.context(),
+    PlatformBridge::paintSpinButton(upPainter.context(),
                                     upThemeData.m_part,
                                     upThemeData.m_state,
                                     upThemeData.m_classicState,
@@ -719,7 +719,7 @@ bool RenderThemeChromiumWin::paintInnerSpinButton(RenderObject* object, const Pa
     half.setY(rect.y() + rect.height() / 2);
     const ThemeData& downThemeData = getThemeData(object, SpinButtonDown);
     ThemePainter downPainter(info.context, half);
-    ChromiumBridge::paintSpinButton(downPainter.context(),
+    PlatformBridge::paintSpinButton(downPainter.context(),
                                     downThemeData.m_part,
                                     downThemeData.m_state,
                                     downThemeData.m_classicState,
@@ -760,7 +760,7 @@ bool RenderThemeChromiumWin::paintProgressBar(RenderObject* o, const PaintInfo&
     IntRect valueRect = renderProgress->isDeterminate() ? determinateProgressValueRectFor(renderProgress, r) : IntRect(0, 0, 0, 0);
     double animatedSeconds = renderProgress->animationStartTime() ?  WTF::currentTime() - renderProgress->animationStartTime() : 0;
     ThemePainter painter(i.context, r);
-    ChromiumBridge::paintProgressBar(painter.context(), r, valueRect, renderProgress->isDeterminate(), animatedSeconds);
+    PlatformBridge::paintProgressBar(painter.context(), r, valueRect, renderProgress->isDeterminate(), animatedSeconds);
     return false;
 }
 
index c0fb444..92e9a7b 100644 (file)
@@ -28,7 +28,7 @@
 #include "config.h"
 #include "IDBFactoryBackendInterface.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 #if ENABLE(INDEXED_DATABASE)
 
@@ -36,12 +36,12 @@ namespace WebCore {
 
 PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendInterface::create()
 {
-    return ChromiumBridge::idbFactory();
+    return PlatformBridge::idbFactory();
 }
 
 IDBFactoryBackendInterface::~IDBFactoryBackendInterface()
 {
-    ChromiumBridge::idbShutdown();
+    PlatformBridge::idbShutdown();
 }
 
 } // namespace WebCore
index 0f10875..38b2983 100644 (file)
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
 void IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue>, 0>& values,  const String& keyPath, Vector<RefPtr<IDBKey>, 0>& keys)
 {
-    ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(values, keyPath, keys);
+    PlatformBridge::createIDBKeysFromSerializedValuesAndKeyPath(values, keyPath, keys);
 }
 
 } // namespace WebCore
index 2b391c9..9d582d2 100644 (file)
@@ -1,3 +1,124 @@
+2011-01-21  Adam Klein  <adamk@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [chromium] Rename ChromiumBridge to PlatformBridge
+        https://bugs.webkit.org/show_bug.cgi?id=52471
+
+        * WebKit.gyp:
+        * src/AssertMatchingEnums.cpp:
+        * src/PlatformBridge.cpp:
+        (WebCore::toChromeClientImpl):
+        (WebCore::toWebWidgetClient):
+        (WebCore::getCookieJar):
+        (WebCore::PlatformBridge::cacheMetadata):
+        (WebCore::PlatformBridge::clipboardIsFormatAvailable):
+        (WebCore::PlatformBridge::clipboardReadPlainText):
+        (WebCore::PlatformBridge::clipboardReadHTML):
+        (WebCore::PlatformBridge::clipboardWriteSelection):
+        (WebCore::PlatformBridge::clipboardWritePlainText):
+        (WebCore::PlatformBridge::clipboardWriteURL):
+        (WebCore::PlatformBridge::clipboardWriteImage):
+        (WebCore::PlatformBridge::clipboardWriteData):
+        (WebCore::PlatformBridge::clipboardReadAvailableTypes):
+        (WebCore::PlatformBridge::clipboardReadData):
+        (WebCore::PlatformBridge::clipboardReadFilenames):
+        (WebCore::PlatformBridge::setCookies):
+        (WebCore::PlatformBridge::cookies):
+        (WebCore::PlatformBridge::cookieRequestHeaderFieldValue):
+        (WebCore::PlatformBridge::rawCookies):
+        (WebCore::PlatformBridge::deleteCookie):
+        (WebCore::PlatformBridge::cookiesEnabled):
+        (WebCore::PlatformBridge::prefetchDNS):
+        (WebCore::PlatformBridge::fileExists):
+        (WebCore::PlatformBridge::deleteFile):
+        (WebCore::PlatformBridge::deleteEmptyDirectory):
+        (WebCore::PlatformBridge::getFileSize):
+        (WebCore::PlatformBridge::revealFolderInOS):
+        (WebCore::PlatformBridge::getFileModificationTime):
+        (WebCore::PlatformBridge::directoryName):
+        (WebCore::PlatformBridge::pathByAppendingComponent):
+        (WebCore::PlatformBridge::makeAllDirectories):
+        (WebCore::PlatformBridge::getAbsolutePath):
+        (WebCore::PlatformBridge::isDirectory):
+        (WebCore::PlatformBridge::filePathToURL):
+        (WebCore::PlatformBridge::openFile):
+        (WebCore::PlatformBridge::closeFile):
+        (WebCore::PlatformBridge::seekFile):
+        (WebCore::PlatformBridge::truncateFile):
+        (WebCore::PlatformBridge::readFromFile):
+        (WebCore::PlatformBridge::writeToFile):
+        (WebCore::PlatformBridge::ensureFontLoaded):
+        (WebCore::PlatformBridge::getFontFamilyForCharacters):
+        (WebCore::PlatformBridge::getRenderStyleForStrike):
+        (WebCore::PlatformBridge::loadFont):
+        (WebCore::PlatformBridge::databaseOpenFile):
+        (WebCore::PlatformBridge::databaseDeleteFile):
+        (WebCore::PlatformBridge::databaseGetFileAttributes):
+        (WebCore::PlatformBridge::databaseGetFileSize):
+        (WebCore::PlatformBridge::idbFactory):
+        (WebCore::PlatformBridge::idbShutdown):
+        (WebCore::PlatformBridge::createIDBKeysFromSerializedValuesAndKeyPath):
+        (WebCore::PlatformBridge::signedPublicKeyAndChallengeString):
+        (WebCore::PlatformBridge::computedDefaultLanguage):
+        (WebCore::PlatformBridge::layoutTestMode):
+        (WebCore::PlatformBridge::isSupportedImageMIMEType):
+        (WebCore::PlatformBridge::isSupportedJavaScriptMIMEType):
+        (WebCore::PlatformBridge::isSupportedNonImageMIMEType):
+        (WebCore::PlatformBridge::mimeTypeForExtension):
+        (WebCore::PlatformBridge::mimeTypeFromFile):
+        (WebCore::PlatformBridge::preferredExtensionForMIMEType):
+        (WebCore::PlatformBridge::plugins):
+        (WebCore::PlatformBridge::pluginScriptableObject):
+        (WebCore::PlatformBridge::loadPlatformImageResource):
+        (WebCore::PlatformBridge::loadPlatformAudioResource):
+        (WebCore::PlatformBridge::decodeAudioFileData):
+        (WebCore::PlatformBridge::sandboxEnabled):
+        (WebCore::PlatformBridge::setSharedTimerFiredFunction):
+        (WebCore::PlatformBridge::setSharedTimerFireTime):
+        (WebCore::PlatformBridge::stopSharedTimer):
+        (WebCore::PlatformBridge::decrementStatsCounter):
+        (WebCore::PlatformBridge::incrementStatsCounter):
+        (WebCore::PlatformBridge::histogramCustomCounts):
+        (WebCore::PlatformBridge::histogramEnumeration):
+        (WebCore::PlatformBridge::suddenTerminationChanged):
+        (WebCore::PlatformBridge::currentTime):
+        (WebCore::PlatformBridge::paintButton):
+        (WebCore::PlatformBridge::paintMenuList):
+        (WebCore::PlatformBridge::paintScrollbarArrow):
+        (WebCore::PlatformBridge::paintScrollbarThumb):
+        (WebCore::PlatformBridge::paintScrollbarTrack):
+        (WebCore::PlatformBridge::paintSpinButton):
+        (WebCore::PlatformBridge::paintTextField):
+        (WebCore::PlatformBridge::paintTrackbar):
+        (WebCore::PlatformBridge::paintProgressBar):
+        (WebCore::WebThemePart):
+        (WebCore::WebThemeState):
+        (WebCore::GetWebThemeExtraParams):
+        (WebCore::PlatformBridge::getThemePartSize):
+        (WebCore::PlatformBridge::paintThemePart):
+        (WebCore::PlatformBridge::traceEventBegin):
+        (WebCore::PlatformBridge::traceEventEnd):
+        (WebCore::PlatformBridge::visitedLinkHash):
+        (WebCore::PlatformBridge::isLinkVisited):
+        (WebCore::PlatformBridge::notifyJSOutOfMemory):
+        (WebCore::PlatformBridge::memoryUsageMB):
+        (WebCore::PlatformBridge::actualMemoryUsageMB):
+        (WebCore::PlatformBridge::screenDepth):
+        (WebCore::PlatformBridge::screenDepthPerComponent):
+        (WebCore::PlatformBridge::screenIsMonochrome):
+        (WebCore::PlatformBridge::screenRect):
+        (WebCore::PlatformBridge::screenAvailableRect):
+        (WebCore::PlatformBridge::popupsAllowed):
+        (WebCore::WorkerContextProxy::create):
+        * src/ResourceHandle.cpp:
+        (WebCore::ResourceHandle::cacheMetadata):
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::WebFrameImpl):
+        (WebKit::WebFrameImpl::~WebFrameImpl):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
 2011-01-20  Adam Klein  <adamk@chromium.org>
 
         Reviewed by Andreas Kling.
index 85f671d..f40f4a2 100644 (file)
                 'src/BoundObject.h',
                 'src/ChromeClientImpl.cpp',
                 'src/ChromeClientImpl.h',
-                'src/ChromiumBridge.cpp',
                 'src/ChromiumCurrentTime.cpp',
                 'src/ChromiumThreading.cpp',
                 'src/CompositionUnderlineBuilder.h',
                 'src/MediaPlayerPrivateChromium.cpp',
                 'src/NotificationPresenterImpl.h',
                 'src/NotificationPresenterImpl.cpp',
+                'src/PlatformBridge.cpp',
                 'src/PlatformMessagePortChannel.cpp',
                 'src/PlatformMessagePortChannel.h',
                 'src/ResourceHandle.cpp',
index e1ee4a1..e89fb74 100644 (file)
@@ -80,7 +80,7 @@
 #include <wtf/text/StringImpl.h>
 
 #if OS(DARWIN)
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "mac/WebThemeEngine.h"
 #endif
 
@@ -398,17 +398,17 @@ COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, Geoloca
 COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
 
 #if OS(DARWIN)
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, ChromiumBridge::StateDisabled);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateInactive, ChromiumBridge::StateInactive);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateActive, ChromiumBridge::StateActive);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StatePressed, ChromiumBridge::StatePressed);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, PlatformBridge::StateDisabled);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateInactive, PlatformBridge::StateInactive);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateActive, PlatformBridge::StateActive);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StatePressed, PlatformBridge::StatePressed);
 
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeRegular, ChromiumBridge::SizeRegular);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeSmall, ChromiumBridge::SizeSmall);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeRegular, PlatformBridge::SizeRegular);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeSmall, PlatformBridge::SizeSmall);
 
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationHorizontal, ChromiumBridge::ScrollbarOrientationHorizontal);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationVertical, ChromiumBridge::ScrollbarOrientationVertical);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationHorizontal, PlatformBridge::ScrollbarOrientationHorizontal);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationVertical, PlatformBridge::ScrollbarOrientationVertical);
 
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentScrollView, ChromiumBridge::ScrollbarParentScrollView);
-COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentRenderLayer, ChromiumBridge::ScrollbarParentRenderLayer);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentScrollView, PlatformBridge::ScrollbarParentScrollView);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentRenderLayer, PlatformBridge::ScrollbarParentRenderLayer);
 #endif
@@ -29,7 +29,7 @@
  */
 
 #include "config.h"
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 
 #include <googleurl/src/url_util.h>
 
@@ -145,14 +145,14 @@ static WebCookieJar* getCookieJar(const Document* document)
 
 // Cache ----------------------------------------------------------------------
 
-void ChromiumBridge::cacheMetadata(const KURL& url, double responseTime, const Vector<char>& data)
+void PlatformBridge::cacheMetadata(const KURL& url, double responseTime, const Vector<char>& data)
 {
     webKitClient()->cacheMetadata(url, responseTime, data.data(), data.size());
 }
 
 // Clipboard ------------------------------------------------------------------
 
-bool ChromiumBridge::clipboardIsFormatAvailable(
+bool PlatformBridge::clipboardIsFormatAvailable(
     PasteboardPrivate::ClipboardFormat format,
     PasteboardPrivate::ClipboardBuffer buffer)
 {
@@ -161,14 +161,14 @@ bool ChromiumBridge::clipboardIsFormatAvailable(
         static_cast<WebClipboard::Buffer>(buffer));
 }
 
-String ChromiumBridge::clipboardReadPlainText(
+String PlatformBridge::clipboardReadPlainText(
     PasteboardPrivate::ClipboardBuffer buffer)
 {
     return webKitClient()->clipboard()->readPlainText(
         static_cast<WebClipboard::Buffer>(buffer));
 }
 
-void ChromiumBridge::clipboardReadHTML(
+void PlatformBridge::clipboardReadHTML(
     PasteboardPrivate::ClipboardBuffer buffer,
     String* htmlText, KURL* sourceURL)
 {
@@ -178,7 +178,7 @@ void ChromiumBridge::clipboardReadHTML(
     *sourceURL = url;
 }
 
-void ChromiumBridge::clipboardWriteSelection(const String& htmlText,
+void PlatformBridge::clipboardWriteSelection(const String& htmlText,
                                              const KURL& sourceURL,
                                              const String& plainText,
                                              bool writeSmartPaste)
@@ -187,17 +187,17 @@ void ChromiumBridge::clipboardWriteSelection(const String& htmlText,
         htmlText, sourceURL, plainText, writeSmartPaste);
 }
 
-void ChromiumBridge::clipboardWritePlainText(const String& plainText)
+void PlatformBridge::clipboardWritePlainText(const String& plainText)
 {
     webKitClient()->clipboard()->writePlainText(plainText);
 }
 
-void ChromiumBridge::clipboardWriteURL(const KURL& url, const String& title)
+void PlatformBridge::clipboardWriteURL(const KURL& url, const String& title)
 {
     webKitClient()->clipboard()->writeURL(url, title);
 }
 
-void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
+void PlatformBridge::clipboardWriteImage(NativeImagePtr image,
                                          const KURL& sourceURL,
                                          const String& title)
 {
@@ -209,14 +209,14 @@ void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
     webKitClient()->clipboard()->writeImage(webImage, sourceURL, title);
 }
 
-void ChromiumBridge::clipboardWriteData(const String& type,
+void PlatformBridge::clipboardWriteData(const String& type,
                                         const String& data,
                                         const String& metadata)
 {
     webKitClient()->clipboard()->writeData(type, data, metadata);
 }
 
-HashSet<String> ChromiumBridge::clipboardReadAvailableTypes(
+HashSet<String> PlatformBridge::clipboardReadAvailableTypes(
     PasteboardPrivate::ClipboardBuffer buffer, bool* containsFilenames)
 {
     WebVector<WebString> result = webKitClient()->clipboard()->readAvailableTypes(
@@ -227,7 +227,7 @@ HashSet<String> ChromiumBridge::clipboardReadAvailableTypes(
     return types;
 }
 
-bool ChromiumBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer,
+bool PlatformBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer,
                                        const String& type, String& data, String& metadata)
 {
     WebString resultData;
@@ -241,7 +241,7 @@ bool ChromiumBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer
     return succeeded;
 }
 
-Vector<String> ChromiumBridge::clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer buffer)
+Vector<String> PlatformBridge::clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer buffer)
 {
     WebVector<WebString> result = webKitClient()->clipboard()->readFilenames(
         static_cast<WebClipboard::Buffer>(buffer));
@@ -253,7 +253,7 @@ Vector<String> ChromiumBridge::clipboardReadFilenames(PasteboardPrivate::Clipboa
 
 // Cookies --------------------------------------------------------------------
 
-void ChromiumBridge::setCookies(const Document* document, const KURL& url,
+void PlatformBridge::setCookies(const Document* document, const KURL& url,
                                 const String& value)
 {
     WebCookieJar* cookieJar = getCookieJar(document);
@@ -261,7 +261,7 @@ void ChromiumBridge::setCookies(const Document* document, const KURL& url,
         cookieJar->setCookie(url, document->firstPartyForCookies(), value);
 }
 
-String ChromiumBridge::cookies(const Document* document, const KURL& url)
+String PlatformBridge::cookies(const Document* document, const KURL& url)
 {
     String result;
     WebCookieJar* cookieJar = getCookieJar(document);
@@ -270,7 +270,7 @@ String ChromiumBridge::cookies(const Document* document, const KURL& url)
     return result;
 }
 
-String ChromiumBridge::cookieRequestHeaderFieldValue(const Document* document,
+String PlatformBridge::cookieRequestHeaderFieldValue(const Document* document,
                                                      const KURL& url)
 {
     String result;
@@ -280,7 +280,7 @@ String ChromiumBridge::cookieRequestHeaderFieldValue(const Document* document,
     return result;
 }
 
-bool ChromiumBridge::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies)
+bool PlatformBridge::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies)
 {
     rawCookies.clear();
     WebVector<WebCookie> webCookies;
@@ -304,14 +304,14 @@ bool ChromiumBridge::rawCookies(const Document* document, const KURL& url, Vecto
     return true;
 }
 
-void ChromiumBridge::deleteCookie(const Document* document, const KURL& url, const String& cookieName)
+void PlatformBridge::deleteCookie(const Document* document, const KURL& url, const String& cookieName)
 {
     WebCookieJar* cookieJar = getCookieJar(document);
     if (cookieJar)
         cookieJar->deleteCookie(url, cookieName);
 }
 
-bool ChromiumBridge::cookiesEnabled(const Document* document)
+bool PlatformBridge::cookiesEnabled(const Document* document)
 {
     bool result = false;
     WebCookieJar* cookieJar = getCookieJar(document);
@@ -322,39 +322,39 @@ bool ChromiumBridge::cookiesEnabled(const Document* document)
 
 // DNS ------------------------------------------------------------------------
 
-void ChromiumBridge::prefetchDNS(const String& hostname)
+void PlatformBridge::prefetchDNS(const String& hostname)
 {
     webKitClient()->prefetchHostName(hostname);
 }
 
 // File ------------------------------------------------------------------------
 
-bool ChromiumBridge::fileExists(const String& path)
+bool PlatformBridge::fileExists(const String& path)
 {
     return webKitClient()->fileUtilities()->fileExists(path);
 }
 
-bool ChromiumBridge::deleteFile(const String& path)
+bool PlatformBridge::deleteFile(const String& path)
 {
     return webKitClient()->fileUtilities()->deleteFile(path);
 }
 
-bool ChromiumBridge::deleteEmptyDirectory(const String& path)
+bool PlatformBridge::deleteEmptyDirectory(const String& path)
 {
     return webKitClient()->fileUtilities()->deleteEmptyDirectory(path);
 }
 
-bool ChromiumBridge::getFileSize(const String& path, long long& result)
+bool PlatformBridge::getFileSize(const String& path, long long& result)
 {
     return webKitClient()->fileUtilities()->getFileSize(path, result);
 }
 
-void ChromiumBridge::revealFolderInOS(const String& path)
+void PlatformBridge::revealFolderInOS(const String& path)
 {
     webKitClient()->fileUtilities()->revealFolderInOS(path);
 }
 
-bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result)
+bool PlatformBridge::getFileModificationTime(const String& path, time_t& result)
 {
     double modificationTime;
     if (!webKitClient()->fileUtilities()->getFileModificationTime(path, modificationTime))
@@ -363,62 +363,62 @@ bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result)
     return true;
 }
 
-String ChromiumBridge::directoryName(const String& path)
+String PlatformBridge::directoryName(const String& path)
 {
     return webKitClient()->fileUtilities()->directoryName(path);
 }
 
-String ChromiumBridge::pathByAppendingComponent(const String& path, const String& component)
+String PlatformBridge::pathByAppendingComponent(const String& path, const String& component)
 {
     return webKitClient()->fileUtilities()->pathByAppendingComponent(path, component);
 }
 
-bool ChromiumBridge::makeAllDirectories(const String& path)
+bool PlatformBridge::makeAllDirectories(const String& path)
 {
     return webKitClient()->fileUtilities()->makeAllDirectories(path);
 }
 
-String ChromiumBridge::getAbsolutePath(const String& path)
+String PlatformBridge::getAbsolutePath(const String& path)
 {
     return webKitClient()->fileUtilities()->getAbsolutePath(path);
 }
 
-bool ChromiumBridge::isDirectory(const String& path)
+bool PlatformBridge::isDirectory(const String& path)
 {
     return webKitClient()->fileUtilities()->isDirectory(path);
 }
 
-KURL ChromiumBridge::filePathToURL(const String& path)
+KURL PlatformBridge::filePathToURL(const String& path)
 {
     return webKitClient()->fileUtilities()->filePathToURL(path);
 }
 
-PlatformFileHandle ChromiumBridge::openFile(const String& path, FileOpenMode mode)
+PlatformFileHandle PlatformBridge::openFile(const String& path, FileOpenMode mode)
 {
     return webKitClient()->fileUtilities()->openFile(path, mode);
 }
 
-void ChromiumBridge::closeFile(PlatformFileHandle& handle)
+void PlatformBridge::closeFile(PlatformFileHandle& handle)
 {
     webKitClient()->fileUtilities()->closeFile(handle);
 }
 
-long long ChromiumBridge::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
+long long PlatformBridge::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
 {
     return webKitClient()->fileUtilities()->seekFile(handle, offset, origin);
 }
 
-bool ChromiumBridge::truncateFile(PlatformFileHandle handle, long long offset)
+bool PlatformBridge::truncateFile(PlatformFileHandle handle, long long offset)
 {
     return webKitClient()->fileUtilities()->truncateFile(handle, offset);
 }
 
-int ChromiumBridge::readFromFile(PlatformFileHandle handle, char* data, int length)
+int PlatformBridge::readFromFile(PlatformFileHandle handle, char* data, int length)
 {
     return webKitClient()->fileUtilities()->readFromFile(handle, data, length);
 }
 
-int ChromiumBridge::writeToFile(PlatformFileHandle handle, const char* data, int length)
+int PlatformBridge::writeToFile(PlatformFileHandle handle, const char* data, int length)
 {
     return webKitClient()->fileUtilities()->writeToFile(handle, data, length);
 }
@@ -426,7 +426,7 @@ int ChromiumBridge::writeToFile(PlatformFileHandle handle, const char* data, int
 // Font -----------------------------------------------------------------------
 
 #if OS(WINDOWS)
-bool ChromiumBridge::ensureFontLoaded(HFONT font)
+bool PlatformBridge::ensureFontLoaded(HFONT font)
 {
     WebSandboxSupport* ss = webKitClient()->sandboxSupport();
 
@@ -437,7 +437,7 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font)
 #endif
 
 #if OS(LINUX) || OS(FREEBSD)
-String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters)
+String PlatformBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters)
 {
     if (webKitClient()->sandboxSupport())
         return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters);
@@ -449,7 +449,7 @@ String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_
     return WebString();
 }
 
-void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result)
+void PlatformBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result)
 {
     WebFontRenderStyle style;
 
@@ -463,7 +463,7 @@ void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle,
 #endif
 
 #if OS(DARWIN)
-bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
+bool PlatformBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
 {
     WebSandboxSupport* ss = webKitClient()->sandboxSupport();
     if (ss)
@@ -480,42 +480,42 @@ bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
 
 // Databases ------------------------------------------------------------------
 
-PlatformFileHandle ChromiumBridge::databaseOpenFile(const String& vfsFileName, int desiredFlags)
+PlatformFileHandle PlatformBridge::databaseOpenFile(const String& vfsFileName, int desiredFlags)
 {
     return webKitClient()->databaseOpenFile(WebString(vfsFileName), desiredFlags);
 }
 
-int ChromiumBridge::databaseDeleteFile(const String& vfsFileName, bool syncDir)
+int PlatformBridge::databaseDeleteFile(const String& vfsFileName, bool syncDir)
 {
     return webKitClient()->databaseDeleteFile(WebString(vfsFileName), syncDir);
 }
 
-long ChromiumBridge::databaseGetFileAttributes(const String& vfsFileName)
+long PlatformBridge::databaseGetFileAttributes(const String& vfsFileName)
 {
     return webKitClient()->databaseGetFileAttributes(WebString(vfsFileName));
 }
 
-long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName)
+long long PlatformBridge::databaseGetFileSize(const String& vfsFileName)
 {
     return webKitClient()->databaseGetFileSize(WebString(vfsFileName));
 }
 
 // Indexed Database -----------------------------------------------------------
 
-PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory()
+PassRefPtr<IDBFactoryBackendInterface> PlatformBridge::idbFactory()
 {
     // There's no reason why we need to allocate a new proxy each time, but
     // there's also no strong reason not to.
     return IDBFactoryBackendProxy::create();
 }
 
-void ChromiumBridge::idbShutdown()
+void PlatformBridge::idbShutdown()
 {
     // In the browser process, this shuts down the utility process. In the renderer process, it does nothing.
     webKitClient()->idbShutdown();
 }
 
-void ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys)
+void PlatformBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys)
 {
     WebVector<WebSerializedScriptValue> webValues = values;
     WebVector<WebIDBKey> webKeys;
@@ -529,7 +529,7 @@ void ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<Re
 
 // Keygen ---------------------------------------------------------------------
 
-String ChromiumBridge::signedPublicKeyAndChallengeString(
+String PlatformBridge::signedPublicKeyAndChallengeString(
     unsigned keySizeIndex, const String& challenge, const KURL& url)
 {
     return webKitClient()->signedPublicKeyAndChallengeString(keySizeIndex,
@@ -539,63 +539,63 @@ String ChromiumBridge::signedPublicKeyAndChallengeString(
 
 // Language -------------------------------------------------------------------
 
-String ChromiumBridge::computedDefaultLanguage()
+String PlatformBridge::computedDefaultLanguage()
 {
     return webKitClient()->defaultLocale();
 }
 
 // LayoutTestMode -------------------------------------------------------------
 
-bool ChromiumBridge::layoutTestMode()
+bool PlatformBridge::layoutTestMode()
 {
     return WebKit::layoutTestMode();
 }
 
 // MimeType -------------------------------------------------------------------
 
-bool ChromiumBridge::isSupportedImageMIMEType(const String& mimeType)
+bool PlatformBridge::isSupportedImageMIMEType(const String& mimeType)
 {
     return webKitClient()->mimeRegistry()->supportsImageMIMEType(mimeType)
         != WebMimeRegistry::IsNotSupported;
 }
 
-bool ChromiumBridge::isSupportedJavaScriptMIMEType(const String& mimeType)
+bool PlatformBridge::isSupportedJavaScriptMIMEType(const String& mimeType)
 {
     return webKitClient()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType)
         != WebMimeRegistry::IsNotSupported;
 }
 
-bool ChromiumBridge::isSupportedNonImageMIMEType(const String& mimeType)
+bool PlatformBridge::isSupportedNonImageMIMEType(const String& mimeType)
 {
     return webKitClient()->mimeRegistry()->supportsNonImageMIMEType(mimeType)
         != WebMimeRegistry::IsNotSupported;
 }
 
-String ChromiumBridge::mimeTypeForExtension(const String& extension)
+String PlatformBridge::mimeTypeForExtension(const String& extension)
 {
     return webKitClient()->mimeRegistry()->mimeTypeForExtension(extension);
 }
 
-String ChromiumBridge::mimeTypeFromFile(const String& path)
+String PlatformBridge::mimeTypeFromFile(const String& path)
 {
     return webKitClient()->mimeRegistry()->mimeTypeFromFile(path);
 }
 
-String ChromiumBridge::preferredExtensionForMIMEType(const String& mimeType)
+String PlatformBridge::preferredExtensionForMIMEType(const String& mimeType)
 {
     return webKitClient()->mimeRegistry()->preferredExtensionForMIMEType(mimeType);
 }
 
 // Plugin ---------------------------------------------------------------------
 
-bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo>* results)
+bool PlatformBridge::plugins(bool refresh, Vector<PluginInfo>* results)
 {
     WebPluginListBuilderImpl builder(results);
     webKitClient()->getPluginList(refresh, &builder);
     return true;  // FIXME: There is no need for this function to return a value.
 }
 
-NPObject* ChromiumBridge::pluginScriptableObject(Widget* widget)
+NPObject* PlatformBridge::pluginScriptableObject(Widget* widget)
 {
     if (!widget || !widget->isPluginContainer())
         return 0;
@@ -605,7 +605,7 @@ NPObject* ChromiumBridge::pluginScriptableObject(Widget* widget)
 
 // Resources ------------------------------------------------------------------
 
-PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name)
+PassRefPtr<Image> PlatformBridge::loadPlatformImageResource(const char* name)
 {
     const WebData& resource = webKitClient()->loadResource(name);
     if (resource.isEmpty())
@@ -618,7 +618,7 @@ PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name)
 
 #if ENABLE(WEB_AUDIO)
 
-PassOwnPtr<AudioBus> ChromiumBridge::loadPlatformAudioResource(const char* name, double sampleRate)
+PassOwnPtr<AudioBus> PlatformBridge::loadPlatformAudioResource(const char* name, double sampleRate)
 {
     const WebData& resource = webKitClient()->loadResource(name);
     if (resource.isEmpty())
@@ -627,7 +627,7 @@ PassOwnPtr<AudioBus> ChromiumBridge::loadPlatformAudioResource(const char* name,
     return decodeAudioFileData(resource.data(), resource.size(), sampleRate);
 }
 
-PassOwnPtr<AudioBus> ChromiumBridge::decodeAudioFileData(const char* data, size_t size, double sampleRate)
+PassOwnPtr<AudioBus> PlatformBridge::decodeAudioFileData(const char* data, size_t size, double sampleRate)
 {
     WebAudioBus webAudioBus;
     if (webKitClient()->loadAudioResource(&webAudioBus, data, size, sampleRate))
@@ -639,60 +639,60 @@ PassOwnPtr<AudioBus> ChromiumBridge::decodeAudioFileData(const char* data, size_
 
 // Sandbox --------------------------------------------------------------------
 
-bool ChromiumBridge::sandboxEnabled()
+bool PlatformBridge::sandboxEnabled()
 {
     return webKitClient()->sandboxEnabled();
 }
 
 // SharedTimers ---------------------------------------------------------------
 
-void ChromiumBridge::setSharedTimerFiredFunction(void (*func)())
+void PlatformBridge::setSharedTimerFiredFunction(void (*func)())
 {
     webKitClient()->setSharedTimerFiredFunction(func);
 }
 
-void ChromiumBridge::setSharedTimerFireTime(double fireTime)
+void PlatformBridge::setSharedTimerFireTime(double fireTime)
 {
     webKitClient()->setSharedTimerFireTime(fireTime);
 }
 
-void ChromiumBridge::stopSharedTimer()
+void PlatformBridge::stopSharedTimer()
 {
     webKitClient()->stopSharedTimer();
 }
 
 // StatsCounters --------------------------------------------------------------
 
-void ChromiumBridge::decrementStatsCounter(const char* name)
+void PlatformBridge::decrementStatsCounter(const char* name)
 {
     webKitClient()->decrementStatsCounter(name);
 }
 
-void ChromiumBridge::incrementStatsCounter(const char* name)
+void PlatformBridge::incrementStatsCounter(const char* name)
 {
     webKitClient()->incrementStatsCounter(name);
 }
 
-void ChromiumBridge::histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount)
+void PlatformBridge::histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount)
 {
     webKitClient()->histogramCustomCounts(name, sample, min, max, bucketCount);
 }
 
-void ChromiumBridge::histogramEnumeration(const char* name, int sample, int boundaryValue)
+void PlatformBridge::histogramEnumeration(const char* name, int sample, int boundaryValue)
 {
     webKitClient()->histogramEnumeration(name, sample, boundaryValue);
 }
 
 // Sudden Termination ---------------------------------------------------------
 
-void ChromiumBridge::suddenTerminationChanged(bool enabled)
+void PlatformBridge::suddenTerminationChanged(bool enabled)
 {
     webKitClient()->suddenTerminationChanged(enabled);
 }
 
 // SystemTime -----------------------------------------------------------------
 
-double ChromiumBridge::currentTime()
+double PlatformBridge::currentTime()
 {
     return webKitClient()->currentTime();
 }
@@ -701,7 +701,7 @@ double ChromiumBridge::currentTime()
 
 #if OS(WINDOWS)
 
-void ChromiumBridge::paintButton(
+void PlatformBridge::paintButton(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect)
 {
@@ -709,7 +709,7 @@ void ChromiumBridge::paintButton(
         gc->platformContext()->canvas(), part, state, classicState, rect);
 }
 
-void ChromiumBridge::paintMenuList(
+void PlatformBridge::paintMenuList(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect)
 {
@@ -717,7 +717,7 @@ void ChromiumBridge::paintMenuList(
         gc->platformContext()->canvas(), part, state, classicState, rect);
 }
 
-void ChromiumBridge::paintScrollbarArrow(
+void PlatformBridge::paintScrollbarArrow(
     GraphicsContext* gc, int state, int classicState,
     const IntRect& rect)
 {
@@ -725,7 +725,7 @@ void ChromiumBridge::paintScrollbarArrow(
         gc->platformContext()->canvas(), state, classicState, rect);
 }
 
-void ChromiumBridge::paintScrollbarThumb(
+void PlatformBridge::paintScrollbarThumb(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect)
 {
@@ -733,7 +733,7 @@ void ChromiumBridge::paintScrollbarThumb(
         gc->platformContext()->canvas(), part, state, classicState, rect);
 }
 
-void ChromiumBridge::paintScrollbarTrack(
+void PlatformBridge::paintScrollbarTrack(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect, const IntRect& alignRect)
 {
@@ -742,7 +742,7 @@ void ChromiumBridge::paintScrollbarTrack(
         alignRect);
 }
 
-void ChromiumBridge::paintSpinButton(
+void PlatformBridge::paintSpinButton(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect)
 {
@@ -750,7 +750,7 @@ void ChromiumBridge::paintSpinButton(
         gc->platformContext()->canvas(), part, state, classicState, rect);
 }
 
-void ChromiumBridge::paintTextField(
+void PlatformBridge::paintTextField(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect, const Color& color, bool fillContentArea,
     bool drawEdges)
@@ -763,7 +763,7 @@ void ChromiumBridge::paintTextField(
         backgroundColor, fillContentArea, drawEdges);
 }
 
-void ChromiumBridge::paintTrackbar(
+void PlatformBridge::paintTrackbar(
     GraphicsContext* gc, int part, int state, int classicState,
     const IntRect& rect)
 {
@@ -771,7 +771,7 @@ void ChromiumBridge::paintTrackbar(
         gc->platformContext()->canvas(), part, state, classicState, rect);
 }
 
-void ChromiumBridge::paintProgressBar(
+void PlatformBridge::paintProgressBar(
     GraphicsContext* gc, const IntRect& barRect, const IntRect& valueRect, bool determinate, double animatedSeconds)
 {
     webKitClient()->themeEngine()->paintProgressBar(
@@ -780,37 +780,37 @@ void ChromiumBridge::paintProgressBar(
 
 #elif OS(LINUX)
 
-static WebThemeEngine::Part WebThemePart(ChromiumBridge::ThemePart part)
+static WebThemeEngine::Part WebThemePart(PlatformBridge::ThemePart part)
 {
     switch (part) {
-    case ChromiumBridge::PartScrollbarDownArrow: return WebThemeEngine::PartScrollbarDownArrow;
-    case ChromiumBridge::PartScrollbarLeftArrow: return WebThemeEngine::PartScrollbarLeftArrow;
-    case ChromiumBridge::PartScrollbarRightArrow: return WebThemeEngine::PartScrollbarRightArrow;
-    case ChromiumBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow;
-    case ChromiumBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb;
-    case ChromiumBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
-    case ChromiumBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack;
-    case ChromiumBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
+    case PlatformBridge::PartScrollbarDownArrow: return WebThemeEngine::PartScrollbarDownArrow;
+    case PlatformBridge::PartScrollbarLeftArrow: return WebThemeEngine::PartScrollbarLeftArrow;
+    case PlatformBridge::PartScrollbarRightArrow: return WebThemeEngine::PartScrollbarRightArrow;
+    case PlatformBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow;
+    case PlatformBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb;
+    case PlatformBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
+    case PlatformBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack;
+    case PlatformBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
     }
     ASSERT_NOT_REACHED();
     return WebThemeEngine::PartScrollbarDownArrow;
 }
 
-static WebThemeEngine::State WebThemeState(ChromiumBridge::ThemePaintState state)
+static WebThemeEngine::State WebThemeState(PlatformBridge::ThemePaintState state)
 {
     switch (state) {
-    case ChromiumBridge::StateDisabled: return WebThemeEngine::StateDisabled;
-    case ChromiumBridge::StateHover: return WebThemeEngine::StateHover;
-    case ChromiumBridge::StateNormal: return WebThemeEngine::StateNormal;
-    case ChromiumBridge::StatePressed: return WebThemeEngine::StatePressed;
+    case PlatformBridge::StateDisabled: return WebThemeEngine::StateDisabled;
+    case PlatformBridge::StateHover: return WebThemeEngine::StateHover;
+    case PlatformBridge::StateNormal: return WebThemeEngine::StateNormal;
+    case PlatformBridge::StatePressed: return WebThemeEngine::StatePressed;
     }
     ASSERT_NOT_REACHED();
     return WebThemeEngine::StateDisabled;
 }
 
-static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridge::ThemePaintState state, const ChromiumBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
+static void GetWebThemeExtraParams(PlatformBridge::ThemePart part, PlatformBridge::ThemePaintState state, const PlatformBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
 {
-    if (part == ChromiumBridge::PartScrollbarHorizontalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) {
+    if (part == PlatformBridge::PartScrollbarHorizontalTrack || part == PlatformBridge::PartScrollbarVerticalTrack) {
         webThemeExtraParams->scrollbarTrack.trackX = extraParams->scrollbarTrack.trackX;
         webThemeExtraParams->scrollbarTrack.trackY = extraParams->scrollbarTrack.trackY;
         webThemeExtraParams->scrollbarTrack.trackWidth = extraParams->scrollbarTrack.trackWidth;
@@ -818,12 +818,12 @@ static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridg
     }
 }
 
-IntSize ChromiumBridge::getThemePartSize(ThemePart part)
+IntSize PlatformBridge::getThemePartSize(ThemePart part)
 {
      return webKitClient()->themeEngine()->getSize(WebThemePart(part));
 }
 
-void ChromiumBridge::paintThemePart(
+void PlatformBridge::paintThemePart(
     GraphicsContext* gc, ThemePart part, ThemePaintState state, const IntRect& rect, const ThemePaintExtraParams* extraParams)
 {
     WebThemeEngine::ExtraParams webThemeExtraParams;
@@ -834,7 +834,7 @@ void ChromiumBridge::paintThemePart(
 
 #elif OS(DARWIN)
 
-void ChromiumBridge::paintScrollbarThumb(
+void PlatformBridge::paintScrollbarThumb(
     GraphicsContext* gc, ThemePaintState state, ThemePaintSize size, const IntRect& rect, const ThemePaintScrollbarInfo& scrollbarInfo)
 {
     WebThemeEngine::ScrollbarInfo webThemeScrollbarInfo;
@@ -858,19 +858,19 @@ void ChromiumBridge::paintScrollbarThumb(
 
 // Trace Event ----------------------------------------------------------------
 
-void ChromiumBridge::traceEventBegin(const char* name, void* id, const char* extra)
+void PlatformBridge::traceEventBegin(const char* name, void* id, const char* extra)
 {
     webKitClient()->traceEventBegin(name, id, extra);
 }
 
-void ChromiumBridge::traceEventEnd(const char* name, void* id, const char* extra)
+void PlatformBridge::traceEventEnd(const char* name, void* id, const char* extra)
 {
     webKitClient()->traceEventEnd(name, id, extra);
 }
 
 // Visited Links --------------------------------------------------------------
 
-LinkHash ChromiumBridge::visitedLinkHash(const UChar* url, unsigned length)
+LinkHash PlatformBridge::visitedLinkHash(const UChar* url, unsigned length)
 {
     url_canon::RawCanonOutput<2048> buffer;
     url_parse::Parsed parsed;
@@ -879,7 +879,7 @@ LinkHash ChromiumBridge::visitedLinkHash(const UChar* url, unsigned length)
     return webKitClient()->visitedLinkHash(buffer.data(), buffer.length());
 }
 
-LinkHash ChromiumBridge::visitedLinkHash(const KURL& base,
+LinkHash PlatformBridge::visitedLinkHash(const KURL& base,
                                          const AtomicString& attributeURL)
 {
     // Resolve the relative URL using googleurl and pass the absolute URL up to
@@ -913,7 +913,7 @@ LinkHash ChromiumBridge::visitedLinkHash(const KURL& base,
     return webKitClient()->visitedLinkHash(buffer.data(), buffer.length());
 }
 
-bool ChromiumBridge::isLinkVisited(LinkHash visitedLinkHash)
+bool PlatformBridge::isLinkVisited(LinkHash visitedLinkHash)
 {
     return webKitClient()->isLinkVisited(visitedLinkHash);
 }
@@ -922,7 +922,7 @@ bool ChromiumBridge::isLinkVisited(LinkHash visitedLinkHash)
 // Glue layer. Once the Glue layer moves entirely into the WebKit layer, these
 // methods will be deleted.
 
-void ChromiumBridge::notifyJSOutOfMemory(Frame* frame)
+void PlatformBridge::notifyJSOutOfMemory(Frame* frame)
 {
     if (!frame)
         return;
@@ -933,17 +933,17 @@ void ChromiumBridge::notifyJSOutOfMemory(Frame* frame)
     webFrame->client()->didExhaustMemoryAvailableForScript(webFrame);
 }
 
-int ChromiumBridge::memoryUsageMB()
+int PlatformBridge::memoryUsageMB()
 {
     return static_cast<int>(webKitClient()->memoryUsageMB());
 }
 
-int ChromiumBridge::actualMemoryUsageMB()
+int PlatformBridge::actualMemoryUsageMB()
 {
     return static_cast<int>(webKitClient()->actualMemoryUsageMB());
 }
 
-int ChromiumBridge::screenDepth(Widget* widget)
+int PlatformBridge::screenDepth(Widget* widget)
 {
     WebWidgetClient* client = toWebWidgetClient(widget);
     if (!client)
@@ -951,7 +951,7 @@ int ChromiumBridge::screenDepth(Widget* widget)
     return client->screenInfo().depth;
 }
 
-int ChromiumBridge::screenDepthPerComponent(Widget* widget)
+int PlatformBridge::screenDepthPerComponent(Widget* widget)
 {
     WebWidgetClient* client = toWebWidgetClient(widget);
     if (!client)
@@ -959,7 +959,7 @@ int ChromiumBridge::screenDepthPerComponent(Widget* widget)
     return client->screenInfo().depthPerComponent;
 }
 
-bool ChromiumBridge::screenIsMonochrome(Widget* widget)
+bool PlatformBridge::screenIsMonochrome(Widget* widget)
 {
     WebWidgetClient* client = toWebWidgetClient(widget);
     if (!client)
@@ -967,7 +967,7 @@ bool ChromiumBridge::screenIsMonochrome(Widget* widget)
     return client->screenInfo().isMonochrome;
 }
 
-IntRect ChromiumBridge::screenRect(Widget* widget)
+IntRect PlatformBridge::screenRect(Widget* widget)
 {
     WebWidgetClient* client = toWebWidgetClient(widget);
     if (!client)
@@ -975,7 +975,7 @@ IntRect ChromiumBridge::screenRect(Widget* widget)
     return client->screenInfo().rect;
 }
 
-IntRect ChromiumBridge::screenAvailableRect(Widget* widget)
+IntRect PlatformBridge::screenAvailableRect(Widget* widget)
 {
     WebWidgetClient* client = toWebWidgetClient(widget);
     if (!client)
@@ -983,7 +983,7 @@ IntRect ChromiumBridge::screenAvailableRect(Widget* widget)
     return client->screenInfo().availableRect;
 }
 
-bool ChromiumBridge::popupsAllowed(NPP npp)
+bool PlatformBridge::popupsAllowed(NPP npp)
 {
     // FIXME: Give the embedder a way to control this.
     return false;
index 83e0017..72f60bb 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "ResourceHandle.h"
 
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
 #include "ResourceHandleClient.h"
 #include "ResourceRequest.h"
 #include "SharedBuffer.h"
@@ -330,7 +330,7 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*)
 // static
 void ResourceHandle::cacheMetadata(const ResourceResponse& response, const Vector<char>& data)
 {
-    ChromiumBridge::cacheMetadata(response.url(), response.responseTime(), data);
+    PlatformBridge::cacheMetadata(response.url(), response.responseTime(), data);
 }
 
 } // namespace WebCore
index 4d19053..4af9707 100644 (file)
@@ -74,7 +74,6 @@
 #include "AssociatedURLLoader.h"
 #include "BackForwardController.h"
 #include "Chrome.h"
-#include "ChromiumBridge.h"
 #include "ClipboardUtilitiesChromium.h"
 #include "Console.h"
 #include "DOMUtilitiesPrivate.h"
 #include "InspectorController.h"
 #include "Page.h"
 #include "Performance.h"
+#include "PlatformBridge.h"
 #include "PlatformContextSkia.h"
 #include "PluginDocument.h"
 #include "PrintContext.h"
@@ -1821,13 +1821,13 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
     , m_animationController(this)
     , m_identifier(generateFrameIdentifier())
 {
-    ChromiumBridge::incrementStatsCounter(webFrameActiveCount);
+    PlatformBridge::incrementStatsCounter(webFrameActiveCount);
     frameCount++;
 }
 
 WebFrameImpl::~WebFrameImpl()
 {
-    ChromiumBridge::decrementStatsCounter(webFrameActiveCount);
+    PlatformBridge::decrementStatsCounter(webFrameActiveCount);
     frameCount--;
 
     cancelPendingScopingEffort();
index e1756d2..798e5ff 100644 (file)
 #include "AutoFillPopupMenuClient.h"
 #include "AXObjectCache.h"
 #include "BackForwardListChromium.h"
+#include "CSSStyleSelector.h"
+#include "CSSValueKeywords.h"
 #include "Chrome.h"
-#include "ChromiumBridge.h"
 #include "ColorSpace.h"
 #include "CompositionUnderlineVectorBuilder.h"
 #include "ContextMenu.h"
 #include "ContextMenuController.h"
 #include "ContextMenuItem.h"
-#include "CSSStyleSelector.h"
-#include "CSSValueKeywords.h"
 #include "Cursor.h"
+#include "DOMUtilitiesPrivate.h"
 #include "DeviceOrientationClientProxy.h"
 #include "Document.h"
 #include "DocumentLoader.h"
-#include "DOMUtilitiesPrivate.h"
 #include "DragController.h"
-#include "DragScrollTimer.h"
 #include "DragData.h"
+#include "DragScrollTimer.h"
 #include "Editor.h"
 #include "EventHandler.h"
 #include "Extensions3D.h"
@@ -65,8 +64,8 @@
 #include "GraphicsContext3DInternal.h"
 #include "HTMLInputElement.h"
 #include "HTMLMediaElement.h"
-#include "HitTestResult.h"
 #include "HTMLNames.h"
+#include "HitTestResult.h"
 #include "Image.h"
 #include "ImageBuffer.h"
 #include "InspectorController.h"
@@ -78,6 +77,7 @@
 #include "PageGroup.h"
 #include "PageGroupLoadDeferrer.h"
 #include "Pasteboard.h"
+#include "PlatformBridge.h"
 #include "PlatformContextSkia.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformMouseEvent.h"
@@ -98,8 +98,8 @@
 #include "Vector.h"
 #include "WebAccessibilityObject.h"
 #include "WebAutoFillClient.h"
-#include "WebDevToolsAgentPrivate.h"
 #include "WebDevToolsAgentImpl.h"
+#include "WebDevToolsAgentPrivate.h"
 #include "WebDragData.h"
 #include "WebFrameImpl.h"
 #include "WebImage.h"
@@ -2299,7 +2299,7 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
 
 void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
 {
-    ChromiumBridge::histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
+    PlatformBridge::histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
 
     if (m_isAcceleratedCompositingActive == active)
         return;