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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_audio_track_host.cc

Issue 598483002: Fix WeakPtrFactory member ordering in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed order of friend class Created 6 years, 2 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/renderer/pepper/pepper_media_stream_audio_track_host.h" 5 #include "content/renderer/pepper/pepper_media_stream_audio_track_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 PepperMediaStreamAudioTrackHost::AudioSink::AudioSink( 66 PepperMediaStreamAudioTrackHost::AudioSink::AudioSink(
67 PepperMediaStreamAudioTrackHost* host) 67 PepperMediaStreamAudioTrackHost* host)
68 : host_(host), 68 : host_(host),
69 buffer_data_size_(0), 69 buffer_data_size_(0),
70 active_buffer_index_(-1), 70 active_buffer_index_(-1),
71 active_buffers_generation_(0), 71 active_buffers_generation_(0),
72 active_buffer_offset_(0), 72 active_buffer_offset_(0),
73 buffers_generation_(0), 73 buffers_generation_(0),
74 main_message_loop_proxy_(base::MessageLoopProxy::current()), 74 main_message_loop_proxy_(base::MessageLoopProxy::current()),
75 weak_factory_(this),
76 number_of_buffers_(kDefaultNumberOfBuffers), 75 number_of_buffers_(kDefaultNumberOfBuffers),
77 bytes_per_second_(0), 76 bytes_per_second_(0),
78 user_buffer_duration_(kDefaultDuration) {} 77 user_buffer_duration_(kDefaultDuration),
78 weak_factory_(this) {}
79 79
80 PepperMediaStreamAudioTrackHost::AudioSink::~AudioSink() { 80 PepperMediaStreamAudioTrackHost::AudioSink::~AudioSink() {
81 DCHECK_EQ(main_message_loop_proxy_, base::MessageLoopProxy::current()); 81 DCHECK_EQ(main_message_loop_proxy_, base::MessageLoopProxy::current());
82 } 82 }
83 83
84 void PepperMediaStreamAudioTrackHost::AudioSink::EnqueueBuffer(int32_t index) { 84 void PepperMediaStreamAudioTrackHost::AudioSink::EnqueueBuffer(int32_t index) {
85 DCHECK_EQ(main_message_loop_proxy_, base::MessageLoopProxy::current()); 85 DCHECK_EQ(main_message_loop_proxy_, base::MessageLoopProxy::current());
86 DCHECK_GE(index, 0); 86 DCHECK_GE(index, 0);
87 DCHECK_LT(index, host_->buffer_manager()->number_of_buffers()); 87 DCHECK_LT(index, host_->buffer_manager()->number_of_buffers());
88 base::AutoLock lock(lock_); 88 base::AutoLock lock(lock_);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 void PepperMediaStreamAudioTrackHost::DidConnectPendingHostToResource() { 370 void PepperMediaStreamAudioTrackHost::DidConnectPendingHostToResource() {
371 if (!connected_) { 371 if (!connected_) {
372 MediaStreamAudioSink::AddToAudioTrack(&audio_sink_, track_); 372 MediaStreamAudioSink::AddToAudioTrack(&audio_sink_, track_);
373 connected_ = true; 373 connected_ = true;
374 } 374 }
375 } 375 }
376 376
377 } // namespace content 377 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_media_stream_audio_track_host.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698