OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class CONTENT_EXPORT MediaStreamCenter | 28 class CONTENT_EXPORT MediaStreamCenter |
29 : NON_EXPORTED_BASE(public blink::WebMediaStreamCenter), | 29 : NON_EXPORTED_BASE(public blink::WebMediaStreamCenter), |
30 public RenderProcessObserver { | 30 public RenderProcessObserver { |
31 public: | 31 public: |
32 MediaStreamCenter(blink::WebMediaStreamCenterClient* client, | 32 MediaStreamCenter(blink::WebMediaStreamCenterClient* client, |
33 PeerConnectionDependencyFactory* factory); | 33 PeerConnectionDependencyFactory* factory); |
34 virtual ~MediaStreamCenter(); | 34 virtual ~MediaStreamCenter(); |
35 | 35 |
36 private: | 36 private: |
37 virtual bool getMediaStreamTrackSources( | 37 virtual bool getMediaStreamTrackSources( |
38 const blink::WebMediaStreamTrackSourcesRequest& request) OVERRIDE; | 38 const blink::WebMediaStreamTrackSourcesRequest& request) override; |
39 | 39 |
40 virtual void didCreateMediaStreamTrack( | 40 virtual void didCreateMediaStreamTrack( |
41 const blink::WebMediaStreamTrack& track) OVERRIDE; | 41 const blink::WebMediaStreamTrack& track) override; |
42 | 42 |
43 virtual void didEnableMediaStreamTrack( | 43 virtual void didEnableMediaStreamTrack( |
44 const blink::WebMediaStreamTrack& track) OVERRIDE; | 44 const blink::WebMediaStreamTrack& track) override; |
45 | 45 |
46 virtual void didDisableMediaStreamTrack( | 46 virtual void didDisableMediaStreamTrack( |
47 const blink::WebMediaStreamTrack& track) OVERRIDE; | 47 const blink::WebMediaStreamTrack& track) override; |
48 | 48 |
49 virtual void didStopLocalMediaStream( | 49 virtual void didStopLocalMediaStream( |
50 const blink::WebMediaStream& stream) OVERRIDE; | 50 const blink::WebMediaStream& stream) override; |
51 | 51 |
52 virtual bool didStopMediaStreamTrack( | 52 virtual bool didStopMediaStreamTrack( |
53 const blink::WebMediaStreamTrack& track) OVERRIDE; | 53 const blink::WebMediaStreamTrack& track) override; |
54 | 54 |
55 virtual blink::WebAudioSourceProvider* | 55 virtual blink::WebAudioSourceProvider* |
56 createWebAudioSourceFromMediaStreamTrack( | 56 createWebAudioSourceFromMediaStreamTrack( |
57 const blink::WebMediaStreamTrack& track) OVERRIDE; | 57 const blink::WebMediaStreamTrack& track) override; |
58 | 58 |
59 | 59 |
60 virtual void didCreateMediaStream( | 60 virtual void didCreateMediaStream( |
61 blink::WebMediaStream& stream) OVERRIDE; | 61 blink::WebMediaStream& stream) override; |
62 | 62 |
63 virtual bool didAddMediaStreamTrack( | 63 virtual bool didAddMediaStreamTrack( |
64 const blink::WebMediaStream& stream, | 64 const blink::WebMediaStream& stream, |
65 const blink::WebMediaStreamTrack& track) OVERRIDE; | 65 const blink::WebMediaStreamTrack& track) override; |
66 | 66 |
67 virtual bool didRemoveMediaStreamTrack( | 67 virtual bool didRemoveMediaStreamTrack( |
68 const blink::WebMediaStream& stream, | 68 const blink::WebMediaStream& stream, |
69 const blink::WebMediaStreamTrack& track) OVERRIDE; | 69 const blink::WebMediaStreamTrack& track) override; |
70 | 70 |
71 // RenderProcessObserver implementation. | 71 // RenderProcessObserver implementation. |
72 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 72 virtual bool OnControlMessageReceived(const IPC::Message& message) override; |
73 | 73 |
74 void OnGetSourcesComplete(int request_id, | 74 void OnGetSourcesComplete(int request_id, |
75 const content::StreamDeviceInfoArray& devices); | 75 const content::StreamDeviceInfoArray& devices); |
76 | 76 |
77 // |rtc_factory_| is a weak pointer and is owned by the RenderThreadImpl. | 77 // |rtc_factory_| is a weak pointer and is owned by the RenderThreadImpl. |
78 // It is valid as long as RenderThreadImpl exist. | 78 // It is valid as long as RenderThreadImpl exist. |
79 PeerConnectionDependencyFactory* rtc_factory_; | 79 PeerConnectionDependencyFactory* rtc_factory_; |
80 | 80 |
81 // A strictly increasing id that's used to label incoming GetSources() | 81 // A strictly increasing id that's used to label incoming GetSources() |
82 // requests. | 82 // requests. |
83 int next_request_id_; | 83 int next_request_id_; |
84 | 84 |
85 typedef std::map<int, blink::WebMediaStreamTrackSourcesRequest> RequestMap; | 85 typedef std::map<int, blink::WebMediaStreamTrackSourcesRequest> RequestMap; |
86 // Maps request ids to request objects. | 86 // Maps request ids to request objects. |
87 RequestMap requests_; | 87 RequestMap requests_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(MediaStreamCenter); | 89 DISALLOW_COPY_AND_ASSIGN(MediaStreamCenter); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
93 | 93 |
94 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ | 94 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
OLD | NEW |