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

Side by Side Diff: content/renderer/media/mock_web_peer_connection_00_handler_client.cc

Issue 9699069: Adding JSEP PeerConnection glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed missing export. Created 8 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "base/utf_string_conversions.h"
7 #include "content/renderer/media/mock_web_peer_connection_00_handler_client.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebICECandid ateDescriptor.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amDescriptor.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
11
12 namespace WebKit {
13
14 MockWebPeerConnection00HandlerClient::
15 MockWebPeerConnection00HandlerClient()
16 : ready_state_(ReadyStateNew),
17 more_to_follow_(false) {
18 }
19
20 MockWebPeerConnection00HandlerClient::
21 ~MockWebPeerConnection00HandlerClient() {}
22
23 void MockWebPeerConnection00HandlerClient::didGenerateICECandidate(
24 const WebICECandidateDescriptor& candidate,
25 bool more_to_follow) {
26 if (candidate.isNull()) {
27 candidate_label_.clear();
28 candidate_sdp_.clear();
29 } else {
30 candidate_label_ = UTF16ToUTF8(candidate.label());
31 candidate_sdp_ = UTF16ToUTF8(candidate.candidateLine());
32 }
33 more_to_follow_ = more_to_follow;
34 }
35
36 void MockWebPeerConnection00HandlerClient::didChangeReadyState(
37 ReadyState state) {
38 ready_state_ = state;
39 }
40
41 void MockWebPeerConnection00HandlerClient::didChangeICEState(ICEState state) {
42 NOTIMPLEMENTED();
43 }
44
45 void MockWebPeerConnection00HandlerClient::didAddRemoteStream(
46 const WebMediaStreamDescriptor& stream_descriptor) {
47 stream_label_ = UTF16ToUTF8(stream_descriptor.label());
48 }
49
50 void MockWebPeerConnection00HandlerClient::didRemoveRemoteStream(
51 const WebMediaStreamDescriptor& stream_descriptor) {
52 DCHECK(stream_label_ == UTF16ToUTF8(stream_descriptor.label()));
53 stream_label_.clear();
54 }
55
56 } // namespace WebKit
OLDNEW
« no previous file with comments | « content/renderer/media/mock_web_peer_connection_00_handler_client.h ('k') | content/renderer/media/peer_connection_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698