| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/html/TimeRanges.h" | 31 #include "core/html/TimeRanges.h" |
| 32 #include "core/page/Frame.h" | 32 #include "core/page/Frame.h" |
| 33 #include "core/page/FrameView.h" | 33 #include "core/page/FrameView.h" |
| 34 #include "core/page/Settings.h" | 34 #include "core/page/Settings.h" |
| 35 #include "core/platform/ContentType.h" | 35 #include "core/platform/ContentType.h" |
| 36 #include "core/platform/Logging.h" | 36 #include "core/platform/Logging.h" |
| 37 #include "core/platform/MIMETypeFromURL.h" | 37 #include "core/platform/MIMETypeFromURL.h" |
| 38 #include "core/platform/MIMETypeRegistry.h" | 38 #include "core/platform/MIMETypeRegistry.h" |
| 39 #include "core/platform/graphics/IntRect.h" | 39 #include "core/platform/graphics/IntRect.h" |
| 40 #include "core/platform/graphics/MediaPlayerPrivate.h" | 40 #include "core/platform/graphics/MediaPlayerPrivate.h" |
| 41 #include "modules/mediasource/MediaSource.h" | 41 #include "modules/mediasource/WebKitMediaSource.h" |
| 42 #include <wtf/text/CString.h> | 42 #include <wtf/text/CString.h> |
| 43 | 43 |
| 44 #include "core/platform/graphics/InbandTextTrackPrivate.h" | 44 #include "core/platform/graphics/InbandTextTrackPrivate.h" |
| 45 | 45 |
| 46 #include "core/platform/graphics/chromium/MediaPlayerPrivateChromium.h" | 46 #include "core/platform/graphics/chromium/MediaPlayerPrivateChromium.h" |
| 47 | 47 |
| 48 namespace WebCore { | 48 namespace WebCore { |
| 49 | 49 |
| 50 const PlatformMedia NoPlatformMedia = { PlatformMedia::None, {0} }; | 50 const PlatformMedia NoPlatformMedia = { PlatformMedia::None, {0} }; |
| 51 | 51 |
| 52 // a null player to make MediaPlayer logic simpler | 52 // a null player to make MediaPlayer logic simpler |
| 53 | 53 |
| 54 class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface { | 54 class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface { |
| 55 public: | 55 public: |
| 56 NullMediaPlayerPrivate(MediaPlayer*) { } | 56 NullMediaPlayerPrivate(MediaPlayer*) { } |
| 57 | 57 |
| 58 virtual void load(const String&) { } | 58 virtual void load(const String&) { } |
| 59 virtual void load(const String&, PassRefPtr<MediaSource>) { } | 59 virtual void load(const String&, PassRefPtr<WebKitMediaSource>) { } |
| 60 virtual void cancelLoad() { } | 60 virtual void cancelLoad() { } |
| 61 | 61 |
| 62 virtual void prepareToPlay() { } | 62 virtual void prepareToPlay() { } |
| 63 virtual void play() { } | 63 virtual void play() { } |
| 64 virtual void pause() { } | 64 virtual void pause() { } |
| 65 | 65 |
| 66 virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } | 66 virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } |
| 67 virtual PlatformLayer* platformLayer() const { return 0; } | 67 virtual PlatformLayer* platformLayer() const { return 0; } |
| 68 | 68 |
| 69 virtual IntSize naturalSize() const { return IntSize(0, 0); } | 69 virtual IntSize naturalSize() const { return IntSize(0, 0); } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 m_contentMIMETypeWasInferredFromExtension = true; | 256 m_contentMIMETypeWasInferredFromExtension = true; |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 | 261 |
| 262 loadWithMediaEngine(); | 262 loadWithMediaEngine(); |
| 263 return m_currentMediaEngine; | 263 return m_currentMediaEngine; |
| 264 } | 264 } |
| 265 | 265 |
| 266 bool MediaPlayer::load(const KURL& url, PassRefPtr<MediaSource> mediaSource) | 266 bool MediaPlayer::load(const KURL& url, PassRefPtr<WebKitMediaSource> mediaSourc
e) |
| 267 { | 267 { |
| 268 m_mediaSource = mediaSource; | 268 m_mediaSource = mediaSource; |
| 269 m_contentMIMEType = ""; | 269 m_contentMIMEType = ""; |
| 270 m_contentTypeCodecs = ""; | 270 m_contentTypeCodecs = ""; |
| 271 m_url = url; | 271 m_url = url; |
| 272 m_keySystem = ""; | 272 m_keySystem = ""; |
| 273 m_contentMIMETypeWasInferredFromExtension = false; | 273 m_contentMIMETypeWasInferredFromExtension = false; |
| 274 loadWithMediaEngine(); | 274 loadWithMediaEngine(); |
| 275 return m_currentMediaEngine; | 275 return m_currentMediaEngine; |
| 276 } | 276 } |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 return m_private->implementsTextTrackControls(); | 868 return m_private->implementsTextTrackControls(); |
| 869 } | 869 } |
| 870 | 870 |
| 871 PassRefPtr<PlatformTextTrackMenuInterface> MediaPlayer::textTrackMenu() | 871 PassRefPtr<PlatformTextTrackMenuInterface> MediaPlayer::textTrackMenu() |
| 872 { | 872 { |
| 873 return m_private->textTrackMenu(); | 873 return m_private->textTrackMenu(); |
| 874 } | 874 } |
| 875 #endif // USE(PLATFORM_TEXT_TRACK_MENU) | 875 #endif // USE(PLATFORM_TEXT_TRACK_MENU) |
| 876 | 876 |
| 877 } | 877 } |
| OLD | NEW |