Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/platform/graphics/media/MediaPlayer.h

Issue 464273002: Cleanup namespace usage in platform/graphics/[filters/* to skia/*] and platform/graphics/[B-D]* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef MediaPlayer_h 26 #ifndef MediaPlayer_h
27 #define MediaPlayer_h 27 #define MediaPlayer_h
28 28
29 #include "public/platform/WebMediaPlayer.h" 29 #include "public/platform/WebMediaPlayer.h"
30 #include "wtf/Forward.h" 30 #include "wtf/Forward.h"
31 #include "wtf/Noncopyable.h" 31 #include "wtf/Noncopyable.h"
32 32
33 namespace blink { 33 namespace blink {
34 class WebContentDecryptionModule;
35 class WebInbandTextTrack;
36 class WebLayer;
37 class WebMediaSource;
38 }
39
40 namespace blink {
41 34
42 class AudioSourceProvider; 35 class AudioSourceProvider;
43 class KURL; 36 class KURL;
44 class MediaPlayer; 37 class MediaPlayer;
45 class TimeRanges; 38 class TimeRanges;
39 class WebContentDecryptionModule;
40 class WebInbandTextTrack;
41 class WebLayer;
42 class WebMediaSource;
46 43
47 class MediaPlayerClient { 44 class MediaPlayerClient {
48 public: 45 public:
49 virtual ~MediaPlayerClient() { } 46 virtual ~MediaPlayerClient() { }
50 47
51 // the network state has changed 48 // the network state has changed
52 virtual void mediaPlayerNetworkStateChanged() = 0; 49 virtual void mediaPlayerNetworkStateChanged() = 0;
53 50
54 // the ready state has changed 51 // the ready state has changed
55 virtual void mediaPlayerReadyStateChanged() = 0; 52 virtual void mediaPlayerReadyStateChanged() = 0;
(...skipping 15 matching lines...) Expand all
71 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d epend on it. 68 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d epend on it.
72 virtual KURL mediaPlayerPosterURL() = 0; 69 virtual KURL mediaPlayerPosterURL() = 0;
73 70
74 // Presentation-related methods 71 // Presentation-related methods
75 // a new frame of video is available 72 // a new frame of video is available
76 virtual void mediaPlayerRepaint() = 0; 73 virtual void mediaPlayerRepaint() = 0;
77 74
78 // the movie size has changed 75 // the movie size has changed
79 virtual void mediaPlayerSizeChanged() = 0; 76 virtual void mediaPlayerSizeChanged() = 0;
80 77
81 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; 78 virtual void mediaPlayerSetWebLayer(WebLayer*) = 0;
82 79
83 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0; 80 virtual void mediaPlayerDidAddTextTrack(WebInbandTextTrack*) = 0;
84 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0; 81 virtual void mediaPlayerDidRemoveTextTrack(WebInbandTextTrack*) = 0;
85 82
86 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; 83 virtual void mediaPlayerMediaSourceOpened(WebMediaSource*) = 0;
87 }; 84 };
88 85
89 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); 86 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*);
90 87
91 class PLATFORM_EXPORT MediaPlayer { 88 class PLATFORM_EXPORT MediaPlayer {
92 WTF_MAKE_NONCOPYABLE(MediaPlayer); 89 WTF_MAKE_NONCOPYABLE(MediaPlayer);
93 public: 90 public:
94 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); 91 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*);
95 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); 92 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer);
96 93
97 static double invalidTime() { return -1.0; } 94 static double invalidTime() { return -1.0; }
98 95
99 MediaPlayer() { } 96 MediaPlayer() { }
100 virtual ~MediaPlayer() { } 97 virtual ~MediaPlayer() { }
101 98
102 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink: :WebMediaPlayer::CORSMode) = 0; 99 virtual void load(WebMediaPlayer::LoadType, const String& url, WebMediaPlaye r::CORSMode) = 0;
103 100
104 enum Preload { None, MetaData, Auto }; 101 enum Preload { None, MetaData, Auto };
105 virtual void setPreload(Preload) = 0; 102 virtual void setPreload(Preload) = 0;
106 103
107 #if ENABLE(WEB_AUDIO) 104 #if ENABLE(WEB_AUDIO)
108 virtual AudioSourceProvider* audioSourceProvider() = 0; 105 virtual AudioSourceProvider* audioSourceProvider() = 0;
109 #endif 106 #endif
110 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; 107 virtual WebMediaPlayer* webMediaPlayer() const = 0;
111 }; 108 };
112 109
113 } 110 } // namespace blink
114 111
115 #endif // MediaPlayer_h 112 #endif // MediaPlayer_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp ('k') | Source/platform/graphics/skia/NativeImageSkia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698