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

Side by Side Diff: content/renderer/media/android/media_source_delegate.h

Issue 496103002: Fix the ownership of media_log_ in WebMediaPlayerAndroid (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: passing refptr to MediaSourceDelegate 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 | content/renderer/media/android/media_source_delegate.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 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 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class Destroyer { 49 class Destroyer {
50 public: 50 public:
51 inline void operator()(void* media_source_delegate) const { 51 inline void operator()(void* media_source_delegate) const {
52 static_cast<MediaSourceDelegate*>(media_source_delegate)->Destroy(); 52 static_cast<MediaSourceDelegate*>(media_source_delegate)->Destroy();
53 } 53 }
54 }; 54 };
55 55
56 MediaSourceDelegate(RendererDemuxerAndroid* demuxer_client, 56 MediaSourceDelegate(RendererDemuxerAndroid* demuxer_client,
57 int demuxer_client_id, 57 int demuxer_client_id,
58 const scoped_refptr<base::MessageLoopProxy>& media_loop, 58 const scoped_refptr<base::MessageLoopProxy>& media_loop,
59 media::MediaLog* media_log); 59 scoped_refptr<media::MediaLog> media_log);
xhwang 2014/08/22 02:34:06 nit: in media code, we pass scoped_refptr by const
qinmin 2014/08/22 16:32:08 Done.
60 60
61 // Initialize the MediaSourceDelegate. |media_source| will be owned by 61 // Initialize the MediaSourceDelegate. |media_source| will be owned by
62 // this object after this call. 62 // this object after this call.
63 void InitializeMediaSource( 63 void InitializeMediaSource(
64 const MediaSourceOpenedCB& media_source_opened_cb, 64 const MediaSourceOpenedCB& media_source_opened_cb,
65 const media::Demuxer::NeedKeyCB& need_key_cb, 65 const media::Demuxer::NeedKeyCB& need_key_cb,
66 const media::SetDecryptorReadyCB& set_decryptor_ready_cb, 66 const media::SetDecryptorReadyCB& set_decryptor_ready_cb,
67 const UpdateNetworkStateCB& update_network_state_cb, 67 const UpdateNetworkStateCB& update_network_state_cb,
68 const DurationChangeCB& duration_change_cb); 68 const DurationChangeCB& duration_change_cb);
69 69
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; 239 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_;
240 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; 240 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_;
241 base::WeakPtr<MediaSourceDelegate> main_weak_this_; 241 base::WeakPtr<MediaSourceDelegate> main_weak_this_;
242 242
243 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); 243 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate);
244 }; 244 };
245 245
246 } // namespace content 246 } // namespace content
247 247
248 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 248 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/media_source_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698