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

Unified Diff: content/renderer/media/mock_web_rtc_peer_connection_handler_client.h

Issue 10703095: New PeerConnection handler in Chrome to support latest PeerConnection draft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit test and mock. Removed old bad mock. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/mock_web_rtc_peer_connection_handler_client.h
diff --git a/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..568ca4a60a857f0f2136e9738769a6ec2b03b9c3
--- /dev/null
+++ b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_
+#define CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebRTCICECandidateDescriptor.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h"
+
+namespace WebKit {
+
+class MockWebRTCPeerConnectionHandlerClient
+ : public WebRTCPeerConnectionHandlerClient {
+ public:
+ MockWebRTCPeerConnectionHandlerClient();
wjia(left Chromium) 2012/08/12 17:06:52 indent.
perkj_chrome 2012/08/13 07:35:46 Done.
+ virtual ~MockWebRTCPeerConnectionHandlerClient();
+
+ // WebRTCPeerConnectionHandlerClient implementation.
+ virtual void doRenegotiate() OVERRIDE;
+ virtual void didGenerateICECandidate(
+ const WebRTCICECandidateDescriptor& candidate) OVERRIDE;
+ virtual void didChangeReadyState(ReadyState) OVERRIDE;
+ virtual void didChangeICEState(ICEState) OVERRIDE;
+ virtual void didAddRemoteStream(
+ const WebMediaStreamDescriptor& stream_descriptor) OVERRIDE;
+ virtual void didRemoveRemoteStream(
+ const WebMediaStreamDescriptor& stream_descriptor) OVERRIDE;
+
+ bool renegotiate() const { return renegotiate_; }
+
+ const std::string& candidate_sdp() const { return candidate_sdp_; }
+ const int candidate_mlineindex() const {
+ return candidate_mline_index_;
+ }
+ const std::string& candidate_mid() const { return candidate_mid_ ; }
+ ReadyState ready_state() const { return ready_state_; }
+ ICEState ice_state() const { return ice_state_; }
+ const std::string& stream_label() const { return stream_label_; }
+
+ private:
+ bool renegotiate_;
+ std::string stream_label_;
+ ReadyState ready_state_;
+ ICEState ice_state_;
+ std::string candidate_sdp_;
+ int candidate_mline_index_;
+ std::string candidate_mid_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandlerClient);
+};
+
+} // namespace WebKit
+
+#endif // CONTENT_RENDERER_MEDIA_MOCK_WEB_RTC_PEER_CONNECTION_HANDLER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698