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

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

Issue 10383151: Refactor MediaStreamImpl and PeerConnection glue implementation after WebKit changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and added NON_EXPORTED_BASE to the base of MediaStreamExtradata. Created 8 years, 7 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 | Annotate | Revision Log
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_PEER_CONNECTION_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/renderer/media/peer_connection_handler_base.h" 14 #include "content/renderer/media/peer_connection_handler_base.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
16 16
17 // PeerConnectionHandler is a delegate for the ROAP PeerConnection API messages 17 // PeerConnectionHandler is a delegate for the ROAP PeerConnection API messages
18 // going between WebKit and native PeerConnection in libjingle. It's owned by 18 // going between WebKit and native PeerConnection in libjingle. It's owned by
19 // WebKit. ROAP PeerConnection will be removed soon. 19 // WebKit. ROAP PeerConnection will be removed soon.
20 class CONTENT_EXPORT PeerConnectionHandler 20 class CONTENT_EXPORT PeerConnectionHandler
21 : public PeerConnectionHandlerBase, 21 : public PeerConnectionHandlerBase,
22 NON_EXPORTED_BASE(public WebKit::WebPeerConnectionHandler) { 22 NON_EXPORTED_BASE(public WebKit::WebPeerConnectionHandler) {
23 public: 23 public:
24 PeerConnectionHandler( 24 PeerConnectionHandler(
25 WebKit::WebPeerConnectionHandlerClient* client, 25 WebKit::WebPeerConnectionHandlerClient* client,
26 MediaStreamImpl* msi,
27 MediaStreamDependencyFactory* dependency_factory); 26 MediaStreamDependencyFactory* dependency_factory);
28 virtual ~PeerConnectionHandler(); 27 virtual ~PeerConnectionHandler();
29 28
30 // WebKit::WebPeerConnectionHandler implementation 29 // WebKit::WebPeerConnectionHandler implementation
31 virtual void initialize( 30 virtual void initialize(
32 const WebKit::WebString& server_configuration, 31 const WebKit::WebString& server_configuration,
33 const WebKit::WebString& username) OVERRIDE; 32 const WebKit::WebString& username) OVERRIDE;
34 virtual void produceInitialOffer( 33 virtual void produceInitialOffer(
35 const WebKit::WebVector<WebKit::WebMediaStreamDescriptor>& 34 const WebKit::WebVector<WebKit::WebMediaStreamDescriptor>&
36 pending_add_streams) OVERRIDE; 35 pending_add_streams) OVERRIDE;
(...skipping 13 matching lines...) Expand all
50 virtual void OnMessage(const std::string& msg) OVERRIDE; 49 virtual void OnMessage(const std::string& msg) OVERRIDE;
51 virtual void OnSignalingMessage(const std::string& msg) OVERRIDE; 50 virtual void OnSignalingMessage(const std::string& msg) OVERRIDE;
52 virtual void OnStateChange(StateType state_changed) OVERRIDE; 51 virtual void OnStateChange(StateType state_changed) OVERRIDE;
53 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) OVERRIDE; 52 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) OVERRIDE;
54 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) OVERRIDE; 53 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) OVERRIDE;
55 virtual void OnIceCandidate( 54 virtual void OnIceCandidate(
56 const webrtc::IceCandidateInterface* candidate) OVERRIDE; 55 const webrtc::IceCandidateInterface* candidate) OVERRIDE;
57 virtual void OnIceComplete() OVERRIDE; 56 virtual void OnIceComplete() OVERRIDE;
58 57
59 private: 58 private:
60 FRIEND_TEST_ALL_PREFIXES(PeerConnectionHandlerTest, Basic);
61
62 void OnAddStreamCallback(webrtc::MediaStreamInterface* stream); 59 void OnAddStreamCallback(webrtc::MediaStreamInterface* stream);
63 void OnRemoveStreamCallback(webrtc::MediaStreamInterface* stream); 60 void OnRemoveStreamCallback(webrtc::MediaStreamInterface* stream);
64 61
65 // client_ is a weak pointer, and is valid until stop() has returned. 62 // client_ is a weak pointer, and is valid until stop() has returned.
66 WebKit::WebPeerConnectionHandlerClient* client_; 63 WebKit::WebPeerConnectionHandlerClient* client_;
67 64
68 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandler); 65 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandler);
69 }; 66 };
70 67
71 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_H_ 68 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_impl.cc ('k') | content/renderer/media/peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698