Commit 28caee51 authored by qinmin@chromium.org's avatar qinmin@chromium.org

Fix the ownership of media_log_ in WebMediaPlayerAndroid

WebMediaPlayer should own media_log_, fix the leak there.

Review URL: https://codereview.chromium.org/496103002

Cr-Commit-Position: refs/heads/master@{#291443}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291443 0039d316-1c4b-4281-b951-d872f2087c98
parent 91a9fe49
...@@ -49,7 +49,7 @@ MediaSourceDelegate::MediaSourceDelegate( ...@@ -49,7 +49,7 @@ MediaSourceDelegate::MediaSourceDelegate(
RendererDemuxerAndroid* demuxer_client, RendererDemuxerAndroid* demuxer_client,
int demuxer_client_id, int demuxer_client_id,
const scoped_refptr<base::MessageLoopProxy>& media_loop, const scoped_refptr<base::MessageLoopProxy>& media_loop,
media::MediaLog* media_log) const scoped_refptr<media::MediaLog> media_log)
: demuxer_client_(demuxer_client), : demuxer_client_(demuxer_client),
demuxer_client_id_(demuxer_client_id), demuxer_client_id_(demuxer_client_id),
media_log_(media_log), media_log_(media_log),
......
...@@ -56,7 +56,7 @@ class MediaSourceDelegate : public media::DemuxerHost { ...@@ -56,7 +56,7 @@ class MediaSourceDelegate : public media::DemuxerHost {
MediaSourceDelegate(RendererDemuxerAndroid* demuxer_client, MediaSourceDelegate(RendererDemuxerAndroid* demuxer_client,
int demuxer_client_id, int demuxer_client_id,
const scoped_refptr<base::MessageLoopProxy>& media_loop, const scoped_refptr<base::MessageLoopProxy>& media_loop,
media::MediaLog* media_log); const scoped_refptr<media::MediaLog> media_log);
// Initialize the MediaSourceDelegate. |media_source| will be owned by // Initialize the MediaSourceDelegate. |media_source| will be owned by
// this object after this call. // this object after this call.
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "media/base/bind_to_current_loop.h" #include "media/base/bind_to_current_loop.h"
// TODO(xhwang): Remove when we remove prefixed EME implementation. // TODO(xhwang): Remove when we remove prefixed EME implementation.
#include "media/base/media_keys.h" #include "media/base/media_keys.h"
#include "media/base/media_log.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/base/video_frame.h" #include "media/base/video_frame.h"
#include "net/base/mime_util.h" #include "net/base/mime_util.h"
......
...@@ -453,7 +453,7 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer, ...@@ -453,7 +453,7 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer,
// Whether the browser is currently connected to a remote media player. // Whether the browser is currently connected to a remote media player.
bool is_remote_; bool is_remote_;
media::MediaLog* media_log_; scoped_refptr<media::MediaLog> media_log_;
scoped_ptr<MediaInfoLoader> info_loader_; scoped_ptr<MediaInfoLoader> info_loader_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment