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

Side by Side Diff: media/cast/test/sender.cc

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/cast_sender_impl.h ('k') | media/cast/test/utility/in_process_receiver.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 // Test application that simulates a cast sender - Data can be either generated 5 // Test application that simulates a cast sender - Data can be either generated
6 // or read from a file. 6 // or read from a file.
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 const VideoSenderConfig video_config_; 319 const VideoSenderConfig video_config_;
320 int audio_diff_; 320 int audio_diff_;
321 const scoped_refptr<AudioFrameInput> audio_frame_input_; 321 const scoped_refptr<AudioFrameInput> audio_frame_input_;
322 const scoped_refptr<VideoFrameInput> video_frame_input_; 322 const scoped_refptr<VideoFrameInput> video_frame_input_;
323 FILE* video_file_; 323 FILE* video_file_;
324 uint8 synthetic_count_; 324 uint8 synthetic_count_;
325 base::TickClock* const clock_; // Not owned by this class. 325 base::TickClock* const clock_; // Not owned by this class.
326 base::TimeTicks start_time_; 326 base::TimeTicks start_time_;
327 base::TimeTicks send_time_; 327 base::TimeTicks send_time_;
328 scoped_ptr<TestAudioBusFactory> audio_bus_factory_; 328 scoped_ptr<TestAudioBusFactory> audio_bus_factory_;
329
330 // NOTE: Weak pointers must be invalidated before all other member variables.
329 base::WeakPtrFactory<SendProcess> weak_factory_; 331 base::WeakPtrFactory<SendProcess> weak_factory_;
332
333 DISALLOW_COPY_AND_ASSIGN(SendProcess);
330 }; 334 };
331 335
332 } // namespace cast 336 } // namespace cast
333 } // namespace media 337 } // namespace media
334 338
335 namespace { 339 namespace {
336 void UpdateCastTransportStatus( 340 void UpdateCastTransportStatus(
337 media::cast::transport::CastTransportStatus status) {} 341 media::cast::transport::CastTransportStatus status) {}
338 342
339 void LogRawEvents( 343 void LogRawEvents(
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 561
558 test_thread.message_loop_proxy()->PostTask( 562 test_thread.message_loop_proxy()->PostTask(
559 FROM_HERE, 563 FROM_HERE,
560 base::Bind(&media::cast::SendProcess::SendFrame, 564 base::Bind(&media::cast::SendProcess::SendFrame,
561 base::Unretained(send_process.get()))); 565 base::Unretained(send_process.get())));
562 566
563 io_message_loop.Run(); 567 io_message_loop.Run();
564 568
565 return 0; 569 return 0;
566 } 570 }
OLDNEW
« no previous file with comments | « media/cast/cast_sender_impl.h ('k') | media/cast/test/utility/in_process_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698