| 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_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 public MediaStreamDispatcherEventHandler, | 47 public MediaStreamDispatcherEventHandler, |
| 48 public base::SupportsWeakPtr<MediaStreamImpl>, | 48 public base::SupportsWeakPtr<MediaStreamImpl>, |
| 49 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 49 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 50 public: | 50 public: |
| 51 MediaStreamImpl( | 51 MediaStreamImpl( |
| 52 RenderView* render_view, | 52 RenderView* render_view, |
| 53 MediaStreamDispatcher* media_stream_dispatcher, | 53 MediaStreamDispatcher* media_stream_dispatcher, |
| 54 MediaStreamDependencyFactory* dependency_factory); | 54 MediaStreamDependencyFactory* dependency_factory); |
| 55 virtual ~MediaStreamImpl(); | 55 virtual ~MediaStreamImpl(); |
| 56 | 56 |
| 57 // Return true when the |url| is media stream. | |
| 58 // This static function has the same functionalilty as IsMediaStream | |
| 59 // except that it doesn't require an instance of this class. | |
| 60 // This can save some overhead time when the |url| is not media stream. | |
| 61 static bool CheckMediaStream(const GURL& url); | |
| 62 | |
| 63 // WebKit::WebUserMediaClient implementation | 57 // WebKit::WebUserMediaClient implementation |
| 64 virtual void requestUserMedia( | 58 virtual void requestUserMedia( |
| 65 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; | 59 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; |
| 66 virtual void cancelUserMediaRequest( | 60 virtual void cancelUserMediaRequest( |
| 67 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; | 61 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; |
| 68 | 62 |
| 69 // webkit_media::MediaStreamClient implementation. | 63 // webkit_media::MediaStreamClient implementation. |
| 70 virtual bool IsMediaStream(const GURL& url) OVERRIDE; | 64 virtual bool IsMediaStream(const GURL& url) OVERRIDE; |
| 71 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( | 65 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( |
| 72 const GURL& url, | 66 const GURL& url, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 MediaStreamDispatcher* media_stream_dispatcher_; | 164 MediaStreamDispatcher* media_stream_dispatcher_; |
| 171 | 165 |
| 172 UserMediaRequests user_media_requests_; | 166 UserMediaRequests user_media_requests_; |
| 173 | 167 |
| 174 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); | 168 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); |
| 175 }; | 169 }; |
| 176 | 170 |
| 177 } // namespace content | 171 } // namespace content |
| 178 | 172 |
| 179 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ | 173 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ |
| OLD | NEW |