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

Side by Side Diff: chrome/browser/media/cast_remoting_sender.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browser/media/cast_remoting_sender.h" 5 #include "chrome/browser/media/cast_remoting_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 media::cast::RtpPayloadType::REMOTE_AUDIO), 85 media::cast::RtpPayloadType::REMOTE_AUDIO),
86 logging_flush_interval_(logging_flush_interval), 86 logging_flush_interval_(logging_flush_interval),
87 frame_event_cb_(cb), 87 frame_event_cb_(cb),
88 clock_(new base::DefaultTickClock()), 88 clock_(new base::DefaultTickClock()),
89 binding_(this), 89 binding_(this),
90 max_ack_delay_(kMaxAckDelay), 90 max_ack_delay_(kMaxAckDelay),
91 last_sent_frame_id_(media::cast::FrameId::first() - 1), 91 last_sent_frame_id_(media::cast::FrameId::first() - 1),
92 latest_acked_frame_id_(media::cast::FrameId::first() - 1), 92 latest_acked_frame_id_(media::cast::FrameId::first() - 1),
93 duplicate_ack_counter_(0), 93 duplicate_ack_counter_(0),
94 input_queue_discards_remaining_(0), 94 input_queue_discards_remaining_(0),
95 pipe_watcher_(FROM_HERE), 95 pipe_watcher_(FROM_HERE, mojo::Watcher::ArmingPolicy::AUTOMATIC),
96 flow_restart_pending_(true), 96 flow_restart_pending_(true),
97 weak_factory_(this) { 97 weak_factory_(this) {
98 // Confirm this constructor is running on the IO BrowserThread. 98 // Confirm this constructor is running on the IO BrowserThread.
99 DCHECK_CURRENTLY_ON(BrowserThread::IO); 99 DCHECK_CURRENTLY_ON(BrowserThread::IO);
100 100
101 CastRemotingSender*& pointer_in_map = g_sender_map.Get()[rtp_stream_id_]; 101 CastRemotingSender*& pointer_in_map = g_sender_map.Get()[rtp_stream_id_];
102 DCHECK(!pointer_in_map); 102 DCHECK(!pointer_in_map);
103 pointer_in_map = this; 103 pointer_in_map = this;
104 104
105 transport_->InitializeStream( 105 transport_->InitializeStream(
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 frame_event_cb_.Run(frame_events); 535 frame_event_cb_.Run(frame_events);
536 } 536 }
537 537
538 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 538 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
539 FROM_HERE, base::Bind(&CastRemotingSender::SendFrameEvents, 539 FROM_HERE, base::Bind(&CastRemotingSender::SendFrameEvents,
540 weak_factory_.GetWeakPtr()), 540 weak_factory_.GetWeakPtr()),
541 logging_flush_interval_); 541 logging_flush_interval_);
542 } 542 }
543 543
544 } // namespace cast 544 } // namespace cast
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/mojo_async_resource_handler.cc » ('j') | content/child/url_response_body_consumer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698