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

Issue 2619593002: Avoid overriding methods from both blink and non-blink at once. (Closed)

Created:
3 years, 11 months ago by danakj
Modified:
3 years, 11 months ago
Reviewers:
hubbe, DaleCurtis
CC:
apacible+watch_chromium.org, chromium-reviews, erickung+watch_chromium.org, feature-media-reviews_chromium.org, miu+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid overriding methods from both blink and non-blink at once. The WebMediaPlayerCast class is-a RendererMediaPlayerInterface, which has methods that look like blink::WebMediaPlayer methods, but it is a chromium-style class. The WebMediaPlayerAndroid is-a blink::WebMediaPlayer and also a RendererMediaPlayerInterface so its overrides end up overriding both at once. This is problematic because, while also being difficult to follow where control flow goes, when the blink names are renamed in the Great Blink Rename to be chromium style, incorrectly-blink-styled names outside of blink will not be renamed and the inheritance here will break. The two methods here are hasVideo() and paused(). It turns out that neither method is ever used as part of the RendererMediaPlayerInterface. And only paused() is used as part of the concrete WebMediaPlayerCast class. So I have removed them both from the RendererMediaPlayerInterface and added IsPaused() as a non-virtual method on WebMediaPlayerCast instead. R=hubbe@chromium.org BUG=578344 Review-Url: https://codereview.chromium.org/2619593002 Cr-Commit-Position: refs/heads/master@{#442052} Committed: https://chromium.googlesource.com/chromium/src/+/4f1fd6a03a5d4d6299dfd02cc8485b42720d1e08

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -24 lines) Patch
M media/blink/renderer_media_player_interface.h View 1 chunk +0 lines, -6 lines 0 comments Download
M media/blink/webmediaplayer_cast_android.h View 2 chunks +1 line, -9 lines 0 comments Download
M media/blink/webmediaplayer_cast_android.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (10 generated)
danakj
3 years, 11 months ago (2017-01-06 18:11:24 UTC) #3
DaleCurtis
lgtm
3 years, 11 months ago (2017-01-06 18:35:26 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2619593002/1
3 years, 11 months ago (2017-01-06 18:44:49 UTC) #11
commit-bot: I haz the power
3 years, 11 months ago (2017-01-06 21:15:54 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/4f1fd6a03a5d4d6299dfd02cc848...

Powered by Google App Engine
This is Rietveld 408576698