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

Unified Diff: content/renderer/media/webmediaplayer_ms.h

Issue 2640573002: Remove WebMediaPlayerDelegate null checks (Closed)
Patch Set: Fixed WMPMS and WMPA Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webmediaplayer_ms.h
diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h
index a4b032fa0a28bb0893744e978a676eeaa3534444..f7c6ac9fb7cdc891759bd68fa8551d97c3121b07 100644
--- a/content/renderer/media/webmediaplayer_ms.h
+++ b/content/renderer/media/webmediaplayer_ms.h
@@ -68,10 +68,11 @@ class CONTENT_EXPORT WebMediaPlayerMS
public:
// Construct a WebMediaPlayerMS with reference to the client, and
// a MediaStreamClient which provides MediaStreamVideoRenderer.
+ // |delegate| must not be null.
WebMediaPlayerMS(
blink::WebFrame* frame,
blink::WebMediaPlayerClient* client,
- base::WeakPtr<media::WebMediaPlayerDelegate> delegate,
+ media::WebMediaPlayerDelegate* delegate,
media::MediaLog* media_log,
std::unique_ptr<MediaStreamRendererFactory> factory,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_,
@@ -204,7 +205,7 @@ class CONTENT_EXPORT WebMediaPlayerMS
// |delegate_id_|; an id provided after registering with the delegate. The
// WebMediaPlayer may also receive directives (play, pause) from the delegate
// via the WebMediaPlayerDelegate::Observer interface after registration.
- const base::WeakPtr<media::WebMediaPlayerDelegate> delegate_;
+ media::WebMediaPlayerDelegate* delegate_;
int delegate_id_;
// Inner class used for transfering frames on compositor thread to

Powered by Google App Engine
This is Rietveld 408576698