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

Side by Side Diff: chrome/renderer/media/cast_rtp_stream.cc

Issue 184853003: Cast: Add GetStats() extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static cast to int Created 6 years, 9 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
« no previous file with comments | « chrome/renderer/media/cast_rtp_stream.h ('k') | chrome/renderer/media/cast_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/media/cast_rtp_stream.h" 5 #include "chrome/renderer/media/cast_rtp_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/renderer/media/cast_session.h" 10 #include "chrome/renderer/media/cast_session.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 void CastRtpStream::ToggleLogging(bool enable) { 348 void CastRtpStream::ToggleLogging(bool enable) {
349 cast_session_->ToggleLogging(IsAudio(), enable); 349 cast_session_->ToggleLogging(IsAudio(), enable);
350 } 350 }
351 351
352 void CastRtpStream::GetRawEvents( 352 void CastRtpStream::GetRawEvents(
353 const base::Callback<void(scoped_ptr<std::string>)>& callback) { 353 const base::Callback<void(scoped_ptr<std::string>)>& callback) {
354 cast_session_->GetEventLogsAndReset(IsAudio(), callback); 354 cast_session_->GetEventLogsAndReset(IsAudio(), callback);
355 } 355 }
356 356
357 void CastRtpStream::GetStats(
358 const base::Callback<void(scoped_ptr<base::DictionaryValue>)>& callback) {
359 cast_session_->GetStatsAndReset(IsAudio(), callback);
360 }
361
357 bool CastRtpStream::IsAudio() const { 362 bool CastRtpStream::IsAudio() const {
358 return track_.source().type() == blink::WebMediaStreamSource::TypeAudio; 363 return track_.source().type() == blink::WebMediaStreamSource::TypeAudio;
359 } 364 }
360 365
361 void CastRtpStream::DidEncounterError(const std::string& message) { 366 void CastRtpStream::DidEncounterError(const std::string& message) {
362 error_callback_.Run(message); 367 error_callback_.Run(message);
363 Stop(); 368 Stop();
364 } 369 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_rtp_stream.h ('k') | chrome/renderer/media/cast_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698