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

Side by Side Diff: content/renderer/media/media_stream_extra_data.h

Issue 10947030: Removed the use of WebFrame::frameForCurrentContext() in MediaStreamCenter::didStopLocalMediaStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing code review comments found by Tommi. Created 8 years, 3 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 // 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/compiler_specific.h" 9 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amDescriptor.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amDescriptor.h"
12 13
13 namespace webrtc { 14 namespace webrtc {
14 class MediaStreamInterface; 15 class MediaStreamInterface;
15 class LocalMediaStreamInterface; 16 class LocalMediaStreamInterface;
16 } // namespace webrtc 17 } // namespace webrtc
17 18
18 class CONTENT_EXPORT MediaStreamExtraData 19 class CONTENT_EXPORT MediaStreamExtraData
19 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamDescriptor::ExtraData) { 20 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamDescriptor::ExtraData) {
20 public: 21 public:
22 typedef base::Callback<void(const std::string& label)> StreamStopCallback;
23
21 explicit MediaStreamExtraData(webrtc::MediaStreamInterface* remote_stream); 24 explicit MediaStreamExtraData(webrtc::MediaStreamInterface* remote_stream);
22 explicit MediaStreamExtraData( 25 explicit MediaStreamExtraData(
23 webrtc::LocalMediaStreamInterface* local_stream); 26 webrtc::LocalMediaStreamInterface* local_stream);
24 virtual ~MediaStreamExtraData(); 27 virtual ~MediaStreamExtraData();
25 28
29 void SetLocalStreamStopCallback(
30 const StreamStopCallback& stop_callback);
31 void OnLocalStreamStop();
32
26 webrtc::MediaStreamInterface* remote_stream() { return remote_stream_.get(); } 33 webrtc::MediaStreamInterface* remote_stream() { return remote_stream_.get(); }
27 webrtc::LocalMediaStreamInterface* local_stream() { 34 webrtc::LocalMediaStreamInterface* local_stream() {
28 return local_stream_.get(); 35 return local_stream_.get();
29 } 36 }
30 37
31 private: 38 private:
39 StreamStopCallback stream_stop_callback_;
32 scoped_refptr<webrtc::MediaStreamInterface> remote_stream_; 40 scoped_refptr<webrtc::MediaStreamInterface> remote_stream_;
33 scoped_refptr<webrtc::LocalMediaStreamInterface> local_stream_; 41 scoped_refptr<webrtc::LocalMediaStreamInterface> local_stream_;
34 42
35 DISALLOW_COPY_AND_ASSIGN(MediaStreamExtraData); 43 DISALLOW_COPY_AND_ASSIGN(MediaStreamExtraData);
36 }; 44 };
37 45
38 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_ 46 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_EXTRA_DATA_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dependency_factory.cc ('k') | content/renderer/media/media_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698