diff options
-rw-r--r-- | webkit/api/src/ApplicationCacheHost.cpp | 20 | ||||
-rw-r--r-- | webkit/api/src/AssertMatchingEnums.cpp | 109 | ||||
-rw-r--r-- | webkit/api/src/ChromiumBridge.cpp | 10 | ||||
-rw-r--r-- | webkit/api/src/NotificationPresenterImpl.cpp | 9 | ||||
-rw-r--r-- | webkit/api/src/WebCursorInfo.cpp | 49 | ||||
-rw-r--r-- | webkit/api/src/WebMediaPlayerClientImpl.cpp | 47 |
6 files changed, 102 insertions, 142 deletions
diff --git a/webkit/api/src/ApplicationCacheHost.cpp b/webkit/api/src/ApplicationCacheHost.cpp index 9758b00..6085dbd 100644 --- a/webkit/api/src/ApplicationCacheHost.cpp +++ b/webkit/api/src/ApplicationCacheHost.cpp @@ -245,26 +245,6 @@ bool ApplicationCacheHost::isApplicationCacheEnabled() && m_documentLoader->frame()->settings()->offlineWebApplicationCacheEnabled(); } -// Ensure that our publicly defined enum values never get out of sync with the -// ones declared for use within WebCore. -#define COMPILE_ASSERT_MATCHING_ENUM(webcoreName, publicName) \ - COMPILE_ASSERT(int(ApplicationCacheHost::webcoreName) == int(WebApplicationCacheHost::publicName), webcoreName) - -COMPILE_ASSERT_MATCHING_ENUM(UNCACHED, Uncached); -COMPILE_ASSERT_MATCHING_ENUM(IDLE, Idle); -COMPILE_ASSERT_MATCHING_ENUM(CHECKING, Checking); -COMPILE_ASSERT_MATCHING_ENUM(DOWNLOADING, Downloading); -COMPILE_ASSERT_MATCHING_ENUM(UPDATEREADY, UpdateReady); -COMPILE_ASSERT_MATCHING_ENUM(OBSOLETE, Obsolete); -COMPILE_ASSERT_MATCHING_ENUM(CHECKING_EVENT, CheckingEvent); -COMPILE_ASSERT_MATCHING_ENUM(ERROR_EVENT, ErrorEvent); -COMPILE_ASSERT_MATCHING_ENUM(NOUPDATE_EVENT, NoUpdateEvent); -COMPILE_ASSERT_MATCHING_ENUM(DOWNLOADING_EVENT, DownloadingEvent); -COMPILE_ASSERT_MATCHING_ENUM(PROGRESS_EVENT, ProgressEvent); -COMPILE_ASSERT_MATCHING_ENUM(UPDATEREADY_EVENT, UpdateReadyEvent); -COMPILE_ASSERT_MATCHING_ENUM(CACHED_EVENT, CachedEvent); -COMPILE_ASSERT_MATCHING_ENUM(OBSOLETE_EVENT, ObsoleteEvent); - } // namespace WebCore #endif // ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/webkit/api/src/AssertMatchingEnums.cpp b/webkit/api/src/AssertMatchingEnums.cpp index 5477d37..c40d708 100644 --- a/webkit/api/src/AssertMatchingEnums.cpp +++ b/webkit/api/src/AssertMatchingEnums.cpp @@ -31,26 +31,121 @@ // Use this file to assert that various WebKit API enum values continue // matching WebCore defined enum values. -// FIXME: Move all of the COMPILE_ASSERTs for enums into this file. +#include "config.h" +#include "ApplicationCacheHost.h" #include "EditorInsertAction.h" +#include "MediaPlayer.h" +#include "NotificationPresenter.h" +#include "PasteboardPrivate.h" +#include "PlatformCursor.h" #include "TextAffinity.h" +#include "WebApplicationCacheHost.h" +#include "WebClipboard.h" +#include "WebCursorInfo.h" #include "WebEditingAction.h" +#include "WebMediaPlayer.h" +#include "WebNotificationPresenter.h" #include "WebTextAffinity.h" #include <wtf/Assertions.h> -using namespace WebCore; +#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ + COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums) -namespace WebKit { +#if ENABLE(OFFLINE_WEB_APPLICATIONS) +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Idle, ApplicationCacheHost::IDLE); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Checking, ApplicationCacheHost::CHECKING); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Downloading, ApplicationCacheHost::DOWNLOADING); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::UpdateReady, ApplicationCacheHost::UPDATEREADY); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Obsolete, ApplicationCacheHost::OBSOLETE); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CheckingEvent, ApplicationCacheHost::CHECKING_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ErrorEvent, ApplicationCacheHost::ERROR_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::NoUpdateEvent, ApplicationCacheHost::NOUPDATE_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::DownloadingEvent, ApplicationCacheHost::DOWNLOADING_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ProgressEvent, ApplicationCacheHost::PROGRESS_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::UpdateReadyEvent, ApplicationCacheHost::UPDATEREADY_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CachedEvent, ApplicationCacheHost::CACHED_EVENT); +COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ObsoleteEvent, ApplicationCacheHost::OBSOLETE_EVENT); +#endif -#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ - COMPILE_ASSERT(int(webkit_name) == int(webcore_name), webkit_name) +COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatHTML, PasteboardPrivate::HTMLFormat); +COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatBookmark, PasteboardPrivate::BookmarkFormat); +COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatSmartPaste, PasteboardPrivate::WebSmartPasteFormat); + +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, PlatformCursor::TypePointer); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, PlatformCursor::TypeCross); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, PlatformCursor::TypeHand); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeIBeam, PlatformCursor::TypeIBeam); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWait, PlatformCursor::TypeWait); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHelp, PlatformCursor::TypeHelp); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastResize, PlatformCursor::TypeEastResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthResize, PlatformCursor::TypeNorthResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastResize, PlatformCursor::TypeNorthEastResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestResize, PlatformCursor::TypeNorthWestResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthResize, PlatformCursor::TypeSouthResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastResize, PlatformCursor::TypeSouthEastResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestResize, PlatformCursor::TypeSouthWestResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestResize, PlatformCursor::TypeWestResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthSouthResize, PlatformCursor::TypeNorthSouthResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastWestResize, PlatformCursor::TypeEastWestResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastSouthWestResize, PlatformCursor::TypeNorthEastSouthWestResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestSouthEastResize, PlatformCursor::TypeNorthWestSouthEastResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeColumnResize, PlatformCursor::TypeColumnResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeRowResize, PlatformCursor::TypeRowResize); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMiddlePanning, PlatformCursor::TypeMiddlePanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastPanning, PlatformCursor::TypeEastPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthPanning, PlatformCursor::TypeNorthPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastPanning, PlatformCursor::TypeNorthEastPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestPanning, PlatformCursor::TypeNorthWestPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthPanning, PlatformCursor::TypeSouthPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastPanning, PlatformCursor::TypeSouthEastPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestPanning, PlatformCursor::TypeSouthWestPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestPanning, PlatformCursor::TypeWestPanning); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMove, PlatformCursor::TypeMove); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeVerticalText, PlatformCursor::TypeVerticalText); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCell, PlatformCursor::TypeCell); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeContextMenu, PlatformCursor::TypeContextMenu); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeAlias, PlatformCursor::TypeAlias); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeProgress, PlatformCursor::TypeProgress); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNoDrop, PlatformCursor::TypeNoDrop); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCopy, PlatformCursor::TypeCopy); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNone, PlatformCursor::TypeNone); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNotAllowed, PlatformCursor::TypeNotAllowed); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, PlatformCursor::TypeZoomIn); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, PlatformCursor::TypeZoomOut); +COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, PlatformCursor::TypeCustom); COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionTyped, EditorInsertActionTyped); COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionPasted, EditorInsertActionPasted); COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionDropped, EditorInsertActionDropped); +#if ENABLE(VIDEO) +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Empty, MediaPlayer::Empty); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Idle, MediaPlayer::Idle); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loading, MediaPlayer::Loading); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loaded, MediaPlayer::Loaded); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::FormatError, MediaPlayer::FormatError); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkError, MediaPlayer::NetworkError); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::DecodeError, MediaPlayer::DecodeError); + +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveNothing, MediaPlayer::HaveNothing); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveMetadata, MediaPlayer::HaveMetadata); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveCurrentData, MediaPlayer::HaveCurrentData); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveFutureData, MediaPlayer::HaveFutureData); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveEnoughData, MediaPlayer::HaveEnoughData); + +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Unknown, MediaPlayer::Unknown); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Download, MediaPlayer::Download); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::StoredStream, MediaPlayer::StoredStream); +COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::LiveStream, MediaPlayer::LiveStream); +#endif + +#if ENABLE(NOTIFICATIONS) +COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionAllowed, NotificationPresenter::PermissionAllowed); +COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionNotAllowed, NotificationPresenter::PermissionNotAllowed); +COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionDenied, NotificationPresenter::PermissionDenied); +#endif + COMPILE_ASSERT_MATCHING_ENUM(WebTextAffinityUpstream, UPSTREAM); COMPILE_ASSERT_MATCHING_ENUM(WebTextAffinityDownstream, DOWNSTREAM); - -} // namespace WebKit diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index 611c647..8d6dc25 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -71,16 +71,6 @@ namespace WebCore { // Clipboard ------------------------------------------------------------------ -COMPILE_ASSERT( - int(PasteboardPrivate::HTMLFormat) == int(WebClipboard::FormatHTML), - FormatHTML); -COMPILE_ASSERT( - int(PasteboardPrivate::BookmarkFormat) == int(WebClipboard::FormatBookmark), - FormatBookmark); -COMPILE_ASSERT( - int(PasteboardPrivate::WebSmartPasteFormat) == int(WebClipboard::FormatSmartPaste), - FormatSmartPaste); - bool ChromiumBridge::clipboardIsFormatAvailable( PasteboardPrivate::ClipboardFormat format) { diff --git a/webkit/api/src/NotificationPresenterImpl.cpp b/webkit/api/src/NotificationPresenterImpl.cpp index d6a8afc..6f879b3 100644 --- a/webkit/api/src/NotificationPresenterImpl.cpp +++ b/webkit/api/src/NotificationPresenterImpl.cpp @@ -45,15 +45,6 @@ using namespace WebCore; namespace WebKit { -// Ensure that our publicly defined enum values never get out of sync with the -// ones declared for use within WebCore. -#define COMPILE_ASSERT_MATCHING_ENUM(name) \ - COMPILE_ASSERT(int(WebNotificationPresenter::name) == int(NotificationPresenter::name), name) - -COMPILE_ASSERT_MATCHING_ENUM(PermissionAllowed); -COMPILE_ASSERT_MATCHING_ENUM(PermissionNotAllowed); -COMPILE_ASSERT_MATCHING_ENUM(PermissionDenied); - class VoidCallbackClient : public WebNotificationPermissionCallback { public: VoidCallbackClient(PassRefPtr<VoidCallback> callback) diff --git a/webkit/api/src/WebCursorInfo.cpp b/webkit/api/src/WebCursorInfo.cpp index 73f42b0..d4b0f81 100644 --- a/webkit/api/src/WebCursorInfo.cpp +++ b/webkit/api/src/WebCursorInfo.cpp @@ -32,60 +32,11 @@ #include "WebCursorInfo.h" #include "Cursor.h" -#include <wtf/Assertions.h> using namespace WebCore; namespace WebKit { -// Ensure that our publicly defined enum values never get out of sync with the -// ones declared for use within WebCore. -#define COMPILE_ASSERT_MATCHING_ENUM(name) \ - COMPILE_ASSERT(int(WebCursorInfo::name) == int(PlatformCursor::name), name) - -COMPILE_ASSERT_MATCHING_ENUM(TypePointer); -COMPILE_ASSERT_MATCHING_ENUM(TypeCross); -COMPILE_ASSERT_MATCHING_ENUM(TypeHand); -COMPILE_ASSERT_MATCHING_ENUM(TypeIBeam); -COMPILE_ASSERT_MATCHING_ENUM(TypeWait); -COMPILE_ASSERT_MATCHING_ENUM(TypeHelp); -COMPILE_ASSERT_MATCHING_ENUM(TypeEastResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeWestResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthSouthResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeEastWestResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthEastSouthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthWestSouthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeColumnResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeRowResize); -COMPILE_ASSERT_MATCHING_ENUM(TypeMiddlePanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeNorthWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeSouthWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(TypeMove); -COMPILE_ASSERT_MATCHING_ENUM(TypeVerticalText); -COMPILE_ASSERT_MATCHING_ENUM(TypeCell); -COMPILE_ASSERT_MATCHING_ENUM(TypeContextMenu); -COMPILE_ASSERT_MATCHING_ENUM(TypeAlias); -COMPILE_ASSERT_MATCHING_ENUM(TypeProgress); -COMPILE_ASSERT_MATCHING_ENUM(TypeNoDrop); -COMPILE_ASSERT_MATCHING_ENUM(TypeCopy); -COMPILE_ASSERT_MATCHING_ENUM(TypeNone); -COMPILE_ASSERT_MATCHING_ENUM(TypeNotAllowed); -COMPILE_ASSERT_MATCHING_ENUM(TypeZoomIn); -COMPILE_ASSERT_MATCHING_ENUM(TypeZoomOut); -COMPILE_ASSERT_MATCHING_ENUM(TypeCustom); - WebCursorInfo::WebCursorInfo(const Cursor& cursor) { type = static_cast<Type>(cursor.impl().type()); diff --git a/webkit/api/src/WebMediaPlayerClientImpl.cpp b/webkit/api/src/WebMediaPlayerClientImpl.cpp index 1620f34..a7c64044 100644 --- a/webkit/api/src/WebMediaPlayerClientImpl.cpp +++ b/webkit/api/src/WebMediaPlayerClientImpl.cpp @@ -234,24 +234,6 @@ void WebMediaPlayerClientImpl::setVolume(float volume) MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const { - COMPILE_ASSERT( - int(WebMediaPlayer::Empty) == int(MediaPlayer::Empty), Empty); - COMPILE_ASSERT( - int(WebMediaPlayer::Idle) == int(MediaPlayer::Idle), Idle); - COMPILE_ASSERT( - int(WebMediaPlayer::Loading) == int(MediaPlayer::Loading), Loading); - COMPILE_ASSERT( - int(WebMediaPlayer::Loaded) == int(MediaPlayer::Loaded), Loaded); - COMPILE_ASSERT( - int(WebMediaPlayer::FormatError) == int(MediaPlayer::FormatError), - FormatError); - COMPILE_ASSERT( - int(WebMediaPlayer::NetworkError) == int(MediaPlayer::NetworkError), - NetworkError); - COMPILE_ASSERT( - int(WebMediaPlayer::DecodeError) == int(MediaPlayer::DecodeError), - DecodeError); - if (m_webMediaPlayer.get()) return static_cast<MediaPlayer::NetworkState>(m_webMediaPlayer->networkState()); return MediaPlayer::Empty; @@ -259,22 +241,6 @@ MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const MediaPlayer::ReadyState WebMediaPlayerClientImpl::readyState() const { - COMPILE_ASSERT( - int(WebMediaPlayer::HaveNothing) == int(MediaPlayer::HaveNothing), - HaveNothing); - COMPILE_ASSERT( - int(WebMediaPlayer::HaveMetadata) == int(MediaPlayer::HaveMetadata), - HaveMetadata); - COMPILE_ASSERT( - int(WebMediaPlayer::HaveCurrentData) == int(MediaPlayer::HaveCurrentData), - HaveCurrentData); - COMPILE_ASSERT( - int(WebMediaPlayer::HaveFutureData) == int(MediaPlayer::HaveFutureData), - HaveFutureData); - COMPILE_ASSERT( - int(WebMediaPlayer::HaveEnoughData) == int(MediaPlayer::HaveEnoughData), - HaveEnoughData); - if (m_webMediaPlayer.get()) return static_cast<MediaPlayer::ReadyState>(m_webMediaPlayer->readyState()); return MediaPlayer::HaveNothing; @@ -359,19 +325,6 @@ bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const { - COMPILE_ASSERT( - int(WebMediaPlayer::Unknown) == int(MediaPlayer::Unknown), - Unknown); - COMPILE_ASSERT( - int(WebMediaPlayer::Download) == int(MediaPlayer::Download), - Download); - COMPILE_ASSERT( - int(WebMediaPlayer::StoredStream) == int(MediaPlayer::StoredStream), - StoredStream); - COMPILE_ASSERT( - int(WebMediaPlayer::LiveStream) == int(MediaPlayer::LiveStream), - LiveStream); - if (m_webMediaPlayer.get()) return static_cast<MediaPlayer::MovieLoadType>( m_webMediaPlayer->movieLoadType()); |