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

Side by Side Diff: media/base/pipeline.h

Issue 423073012: Pipeline: Use WeakPtr for DemuxerHost Calls and Tasks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated unit tests. Created 6 years, 4 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 | « no previous file | media/base/pipeline.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 scoped_ptr<SerialRunner> pending_callbacks_; 424 scoped_ptr<SerialRunner> pending_callbacks_;
425 425
426 bool underflow_disabled_for_testing_; 426 bool underflow_disabled_for_testing_;
427 427
428 base::ThreadChecker thread_checker_; 428 base::ThreadChecker thread_checker_;
429 429
430 // NOTE: Weak pointers must be invalidated before all other member variables. 430 // NOTE: Weak pointers must be invalidated before all other member variables.
431 base::WeakPtrFactory<Pipeline> weak_factory_; 431 base::WeakPtrFactory<Pipeline> weak_factory_;
432 432
433 // Demuxer calls can be made on the render main thread, where we cannot call
434 // weak_factory_.GetWeakPtr() to get weak pointers. Instead, use a permanent
scherkus (not reviewing) 2014/08/05 18:11:30 you sure about this? I'm fairly certain GetWeakPt
xhwang 2014/08/05 20:44:46 Cool, I didn't know that. Double checked weak_ptr.
435 // weak pointer which will be initialized during the Demuxer initialization.
436 base::WeakPtr<Pipeline> weak_this_for_demuxer_;
437
433 DISALLOW_COPY_AND_ASSIGN(Pipeline); 438 DISALLOW_COPY_AND_ASSIGN(Pipeline);
434 }; 439 };
435 440
436 } // namespace media 441 } // namespace media
437 442
438 #endif // MEDIA_BASE_PIPELINE_H_ 443 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698