Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / media / cast / logging / simple_event_subscriber.cc
blob984d8f7d83009a8a82484dedc94ef98cfb51d040
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
3 // found in the LICENSE file.
5 #include "media/cast/logging/simple_event_subscriber.h"
7 #include <vector>
9 #include "base/logging.h"
11 namespace media {
12 namespace cast {
14 SimpleEventSubscriber::SimpleEventSubscriber() {}
16 SimpleEventSubscriber::~SimpleEventSubscriber() {
17 DCHECK(thread_checker_.CalledOnValidThread());
20 void SimpleEventSubscriber::OnReceiveFrameEvent(const FrameEvent& frame_event) {
21 DCHECK(thread_checker_.CalledOnValidThread());
22 frame_events_.push_back(frame_event);
25 void SimpleEventSubscriber::OnReceivePacketEvent(
26 const PacketEvent& packet_event) {
27 DCHECK(thread_checker_.CalledOnValidThread());
28 packet_events_.push_back(packet_event);
31 void SimpleEventSubscriber::GetFrameEventsAndReset(
32 std::vector<FrameEvent>* frame_events) {
33 DCHECK(thread_checker_.CalledOnValidThread());
34 frame_events->swap(frame_events_);
35 frame_events_.clear();
38 void SimpleEventSubscriber::GetPacketEventsAndReset(
39 std::vector<PacketEvent>* packet_events) {
40 DCHECK(thread_checker_.CalledOnValidThread());
41 packet_events->swap(packet_events_);
42 packet_events_.clear();
45 } // namespace cast
46 } // namespace media