| 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_EXTRA_DATA_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 12 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 13 | 13 |
| 14 namespace webrtc { | 14 namespace webrtc { |
| 15 class MediaStreamInterface; | 15 class MediaStreamInterface; |
| 16 } // namespace webrtc | 16 } // namespace webrtc |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class CONTENT_EXPORT MediaStreamExtraData | 20 class CONTENT_EXPORT MediaStreamExtraData |
| 21 : NON_EXPORTED_BASE(public WebKit::WebMediaStream::ExtraData) { | 21 : NON_EXPORTED_BASE(public blink::WebMediaStream::ExtraData) { |
| 22 public: | 22 public: |
| 23 typedef base::Callback<void(const std::string& label)> StreamStopCallback; | 23 typedef base::Callback<void(const std::string& label)> StreamStopCallback; |
| 24 | 24 |
| 25 MediaStreamExtraData(webrtc::MediaStreamInterface* stream, bool is_local); | 25 MediaStreamExtraData(webrtc::MediaStreamInterface* stream, bool is_local); |
| 26 virtual ~MediaStreamExtraData(); | 26 virtual ~MediaStreamExtraData(); |
| 27 | 27 |
| 28 bool is_local() const { return is_local_; } | 28 bool is_local() const { return is_local_; } |
| 29 | 29 |
| 30 void SetLocalStreamStopCallback( | 30 void SetLocalStreamStopCallback( |
| 31 const StreamStopCallback& stop_callback); | 31 const StreamStopCallback& stop_callback); |
| 32 void OnLocalStreamStop(); | 32 void OnLocalStreamStop(); |
| 33 | 33 |
| 34 const scoped_refptr<webrtc::MediaStreamInterface>& stream() const { | 34 const scoped_refptr<webrtc::MediaStreamInterface>& stream() const { |
| 35 return stream_; | 35 return stream_; |
| 36 } | 36 } |
| 37 private: | 37 private: |
| 38 StreamStopCallback stream_stop_callback_; | 38 StreamStopCallback stream_stop_callback_; |
| 39 scoped_refptr<webrtc::MediaStreamInterface> stream_; | 39 scoped_refptr<webrtc::MediaStreamInterface> stream_; |
| 40 bool is_local_; | 40 bool is_local_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(MediaStreamExtraData); | 42 DISALLOW_COPY_AND_ASSIGN(MediaStreamExtraData); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace content | 45 } // namespace content |
| 46 | 46 |
| 47 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ | 47 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ |
| OLD | NEW |