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

Side by Side Diff: content/shell/test_runner/mock_webrtc_peer_connection_handler.cc

Issue 2813023002: [Bindings] Make maplike<> and setlike<> imply a readonly size attribute. (Closed)
Patch Set: merge with 23752147e6f5f7dcaf4bad1bb1c306fb91e1ec5b Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/shell/test_runner/mock_webrtc_peer_connection_handler.h" 5 #include "content/shell/test_runner/mock_webrtc_peer_connection_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return std::unique_ptr<blink::WebRTCStats>(new MockWebRTCStats(stats)); 226 return std::unique_ptr<blink::WebRTCStats>(new MockWebRTCStats(stats));
227 } 227 }
228 return nullptr; 228 return nullptr;
229 } 229 }
230 std::unique_ptr<blink::WebRTCStats> Next() override { 230 std::unique_ptr<blink::WebRTCStats> Next() override {
231 if (i_ >= stats_.size()) 231 if (i_ >= stats_.size())
232 return nullptr; 232 return nullptr;
233 return std::unique_ptr<blink::WebRTCStats>( 233 return std::unique_ptr<blink::WebRTCStats>(
234 new MockWebRTCStats(stats_[i_++])); 234 new MockWebRTCStats(stats_[i_++]));
235 } 235 }
236 size_t Size() const override { return stats_.size(); }
236 237
237 private: 238 private:
238 std::vector<MockWebRTCStats> stats_; 239 std::vector<MockWebRTCStats> stats_;
239 size_t i_; 240 size_t i_;
240 }; 241 };
241 242
242 class MockWebRTCRtpContributingSource 243 class MockWebRTCRtpContributingSource
243 : public blink::WebRTCRtpContributingSource { 244 : public blink::WebRTCRtpContributingSource {
244 public: 245 public:
245 MockWebRTCRtpContributingSource( 246 MockWebRTCRtpContributingSource(
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 const WebMediaStreamTrack& track) { 675 const WebMediaStreamTrack& track) {
675 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate()); 676 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate());
676 } 677 }
677 678
678 void MockWebRTCPeerConnectionHandler::Stop() { 679 void MockWebRTCPeerConnectionHandler::Stop() {
679 stopped_ = true; 680 stopped_ = true;
680 weak_factory_.InvalidateWeakPtrs(); 681 weak_factory_.InvalidateWeakPtrs();
681 } 682 }
682 683
683 } // namespace test_runner 684 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698