1 /*
2  *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "rtc_tools/rtc_event_log_visualizer/plot_protobuf.h"
12 
13 #include <stddef.h>
14 
15 #include <iostream>
16 #include <memory>
17 #include <vector>
18 
19 namespace webrtc {
20 
ProtobufPlot()21 ProtobufPlot::ProtobufPlot() {}
22 
~ProtobufPlot()23 ProtobufPlot::~ProtobufPlot() {}
24 
Draw()25 void ProtobufPlot::Draw() {}
26 
27 
28 
ProtobufPlotCollection()29 ProtobufPlotCollection::ProtobufPlotCollection() {}
30 
~ProtobufPlotCollection()31 ProtobufPlotCollection::~ProtobufPlotCollection() {}
32 
Draw()33 void ProtobufPlotCollection::Draw() {
34   webrtc::analytics::ChartCollection collection;
35   ExportProtobuf(&collection);
36   std::cout << collection.SerializeAsString();
37 }
38 
AppendNewPlot()39 Plot* ProtobufPlotCollection::AppendNewPlot() {
40   Plot* plot = new ProtobufPlot();
41   plots_.push_back(std::unique_ptr<Plot>(plot));
42   return plot;
43 }
44 
45 }  // namespace webrtc
46