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

Issue 2406483002: WIP - Add EME (Closed)

Created:
4 years, 2 months ago by xjz
Modified:
4 years, 1 month ago
Reviewers:
miu
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WIP - Add EME

Patch Set 1 : Original Non-EME patch #

Patch Set 2 : Add EME. #

Total comments: 40

Patch Set 3 : Rebase. Split RemotingSourceImpl. Addressed comments. #

Total comments: 98

Patch Set 4 : Addressed miu's comments. Added more tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1075 lines, -765 lines) Patch
M content/renderer/render_frame_impl.h View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 5 chunks +17 lines, -8 lines 0 comments Download
M media/base/cdm_context.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/cdm_context.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M media/remoting/BUILD.gn View 1 2 3 chunks +12 lines, -3 lines 0 comments Download
A + media/remoting/remoting_cdm.h View 1 2 3 1 chunk +46 lines, -21 lines 0 comments Download
A media/remoting/remoting_cdm.cc View 1 2 3 1 chunk +105 lines, -0 lines 0 comments Download
A media/remoting/remoting_cdm_controller.h View 1 2 3 1 chunk +60 lines, -0 lines 0 comments Download
A + media/remoting/remoting_cdm_controller.cc View 1 2 3 1 chunk +34 lines, -24 lines 0 comments Download
A + media/remoting/remoting_cdm_factory.h View 1 2 3 2 chunks +18 lines, -16 lines 0 comments Download
A media/remoting/remoting_cdm_factory.cc View 1 2 3 1 chunk +86 lines, -0 lines 0 comments Download
D media/remoting/remoting_controller.h View 1 2 1 chunk +0 lines, -110 lines 0 comments Download
D media/remoting/remoting_controller.cc View 1 2 1 chunk +0 lines, -210 lines 0 comments Download
D media/remoting/remoting_controller_unittest.cc View 1 2 1 chunk +0 lines, -172 lines 0 comments Download
A + media/remoting/remoting_renderer_controller.h View 1 2 3 3 chunks +46 lines, -51 lines 0 comments Download
A + media/remoting/remoting_renderer_controller.cc View 1 2 3 4 chunks +117 lines, -97 lines 0 comments Download
A + media/remoting/remoting_renderer_controller_unittest.cc View 1 2 3 7 chunks +224 lines, -44 lines 0 comments Download
M media/remoting/remoting_renderer_factory.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M media/remoting/remoting_renderer_factory.cc View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
A media/remoting/remoting_source_impl.h View 1 2 3 1 chunk +115 lines, -0 lines 0 comments Download
A media/remoting/remoting_source_impl.cc View 1 2 3 1 chunk +172 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
miu
Overall, as I mentioned face-to-face today, I think we should split-up RemotingController into separate classes. ...
4 years, 2 months ago (2016-10-08 01:06:16 UTC) #2
xjz
Split-up the RemotingController and addressed comments. PTAL. https://chromiumcodereview.appspot.com/2406483002/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://chromiumcodereview.appspot.com/2406483002/diff/20001/content/renderer/render_frame_impl.cc#newcode6354 content/renderer/render_frame_impl.cc:6354: #if BUILDFLAG(ENABLE_MEDIA_REMOTING) ...
4 years, 2 months ago (2016-10-20 21:25:28 UTC) #6
miu
Looks great. Please adjust the change description and include other OWNERS as needed (no need ...
4 years, 1 month ago (2016-10-25 04:21:27 UTC) #7
xjz
4 years, 1 month ago (2016-10-26 22:00:28 UTC) #9
Thanks for detailed comments!

Addressed your comments in PS#4. Also added tests on EME case. PTAL.

I don't know how to bring the watch list back for public review in this CL. So I
closed this CL and opened a new CL for public review:
https://codereview.chromium.org/2457563002/.
PS#1 in the new CL is identical to PS#4 here. 
Thanks!

https://codereview.chromium.org/2406483002/diff/100001/content/renderer/rende...
File content/renderer/render_frame_impl.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/content/renderer/rende...
content/renderer/render_frame_impl.cc:2694: return
base::MakeUnique<media::RemotingRendererController>(
On 2016/10/25 04:21:25, miu wrote:
> nit: Looks like you were trying to do this:
> 
>   return base::MakeUnique<media::RemotingRendererController(
>       make_scoped_refptr(new media::RemotingSourceImpl(
>           std::move(remoting_source_request), std::move(remoter))));

Done.

https://codereview.chromium.org/2406483002/diff/100001/content/renderer/rende...
File content/renderer/render_frame_impl.h (right):

https://codereview.chromium.org/2406483002/diff/100001/content/renderer/rende...
content/renderer/render_frame_impl.h:1073: // remoting from/to local playback.
On 2016/10/25 04:21:25, miu wrote:
> nit: This line can go at the end of the line above it.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm.cc:28: NOTIMPLEMENTED();
On 2016/10/25 04:21:25, miu wrote:
> nit: DCHECK(remoting_controller_); so we don't have to worry about whether its
> null in the rest of the code.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm.h (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm.h:32: scoped_refptr<RemotingSourceImpl>
GetRemotingSource();
On 2016/10/25 04:21:25, miu wrote:
> General scoped_refptr usage note: The return type of a direct accessor should
be
> the raw pointer (RemotingSourceImpl*) instead. This lets the caller decide
> whether to increment the ref-count by storing the raw pointer into a
> scoped_refptr.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm.h:61: std::unique_ptr<RemotingCdmController>
remoting_controller_;
On 2016/10/25 04:21:25, miu wrote:
> const

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm_controller.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_controller.cc:16: :
remoting_source_(remoting_source) {
On 2016/10/25 04:21:25, miu wrote:
> nit: Use std::move() here to avoid an unnecessary increment/dercrement on the
> ref-count.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_controller.cc:21:
remoting_source_->RemoveClient(this);
On 2016/10/25 04:21:25, miu wrote:
> DCHECK(thread_checker_...);

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_controller.cc:27:
base::ResetAndReturn(&cdm_check_cb_).Run(success);
On 2016/10/25 04:21:25, miu wrote:
> DCHECK(!cdm_check_cb_.is_null()) before this line to make sure OnStarted() is
> not called multiple times.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_controller.cc:51: cdm_check_cb_ = cb;
On 2016/10/25 04:21:25, miu wrote:
> DCHECK(cdm_check_cb_.is_null()) before this line to make sure there are no
other
> queries in-flight. Or, is it reasonable for there to be? If so,
|cdm_check_cb_|
> would need to be a vector<CdbCheckCallback>.

Done with DCHECK. There should be no other queries in-flight.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm_controller.h (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_controller.h:49: scoped_refptr<RemotingSourceImpl>
remoting_source_;
On 2016/10/25 04:21:25, miu wrote:
> nit: const (and move up to be the first data member, since this is injected at
> construction time).

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm_factory.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_factory.cc:30: new RemotingCdm(key_system,
security_origin, cdm_config, session_message_cb,
On 2016/10/25 04:21:25, miu wrote:
> It's always a little strange to see a "new Foo()" by itself. Could you write a
> comment explaining what takes ownership of RemotingCdm?

Oh, yes, this is wrong. I made this mistake while cleaning up some debugging
codes. Removed it.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_factory.cc:49: remoter_factory_(remoter_factory) {}
On 2016/10/25 04:21:25, miu wrote:
> Please DCHECK that |default_cdm_factory_| and |remoter_factory_| are not null.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_factory.cc:65: std::move(remoting_source_impl));
On 2016/10/25 04:21:25, miu wrote:
> ditto here: Consider using make_scoped_refptr() to simplify a little.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_cdm_factory.h (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_factory.h:17:
RemotingCdmFactory(std::unique_ptr<CdmFactory> default_cdm_factory,
On 2016/10/25 04:21:26, miu wrote:
> Please add a comment that |remoter_factory| should outlive RemotingCdmFactory.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_cdm_factory.h:33: std::unique_ptr<CdmFactory>
default_cdm_factory_;
On 2016/10/25 04:21:26, miu wrote:
> These should be const.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_renderer_controller.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:21:
remoting_source_->RemoveClient(this);
On 2016/10/25 04:21:26, miu wrote:
> Above this line: DCHECK(thread_checker_.CalledOnValidThread());

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:30: switch_renderer_cb_.Run();
On 2016/10/25 04:21:26, miu wrote:
> For safety, you might want to guard this:
> 
>   if (!switch_renderer_cb_.is_null())
>     switch_renderer_cb_.Run();

This callback should never be null here. Added DCHECK.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:43: bool can_start_remoting =
can_start_remoting_;
On 2016/10/25 04:21:26, miu wrote:
> naming nits: The class data member |can_start_remoting_| could mean a lot of
> things. How about |session_can_remote_| to be more precise?
> 
> Also, consider naming this local variable |session_could_remote| (past tense),
> to make the if-statement below more readable. Also, const please. ;)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:82:
remoting_source_->AddClient(this);
On 2016/10/25 04:21:26, miu wrote:
> Suggest adding this helpful comment for readability:
> 
>   remoting_source_->AddClient(this);  // Calls OnSessionStateChanged().

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:104: return;
On 2016/10/25 04:21:26, miu wrote:
> I think you should remove the early return here. Let UpdateAndMaybeSwitch()
> decide what to do (and maybe it would stop an existing remoting session?)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:106: if (has_video_) {
On 2016/10/25 04:21:26, miu wrote:
> Before this line, add:
> 
>   is_encrypted_ = false;
> 
> (To make sure it will become false if it was true before, but now both tracks
> have stopped using encryption.)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:166: if (has_video_ &&
!IsVideoCodecSupported())
On 2016/10/25 04:21:26, miu wrote:
> Before this, I think you should add (this will simplify the code in
> UpdateAndMaybeSwitch()):
> 
>   if (switch_renderer_cb_.is_null())
>     return false;
>   if (!has_audio_ && !has_video_)
>     return false;

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:171: return
remoting_source_->state() == RemotingSessionState::SESSION_STARTED;
On 2016/10/25 04:21:26, miu wrote:
> Consider adding a comment like: "Explicitly ignoring |is_fullscreen_| since
all
> EME content should trigger the start of remoting immediately, and not later
> after switching into fullscreen. This is required by current technical
> limitations."

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.cc:183: return;
On 2016/10/25 04:21:26, miu wrote:
> If you take my suggestions in ShouldBeRemoting() (above), then you don't need
> either of these early-return statements. The code below will always start or
> stop remoting, or do nothing, as appropriate.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_renderer_controller.h (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:1: // Copyright 2016 The Chromium
Authors. All rights reserved.
On 2016/10/25 04:21:26, miu wrote:
> Since remoting_renderer_controller.h/.cc are modifications of the [now
deleted]
> remoting_controller.h/.cc, consider uploading your next patch set with a lower
> similarity (maybe `git cl upload --similarity=20` would work?) so that these
new
> files show up as a diff from the old files.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:41: using SwitchRendererCallback =
base::Callback<void()>;
On 2016/10/25 04:21:26, miu wrote:
> This is the same as base::Closure, so consider removing this typedef and just
> using base::Closure.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:48: // Used to query whether to
create Media Remoting Renderer.
On 2016/10/25 04:21:26, miu wrote:
> To help those unfamiliar with this code: s/Used to query/Used by
> RemotingRendererFactory to query/

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:51: // Used to query whether the
remoting session is permanently terminated.
On 2016/10/25 04:21:26, miu wrote:
> ditto: (Used by RemotingRendererFactory)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:65: // Indicates if this media
element or its ancestor enters full screen.
On 2016/10/25 04:21:26, miu wrote:
> s/if/whether/
> 
> and
> 
> s/enters/is in/

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:69: bool should_be_remoting_ =
false;
On 2016/10/25 04:21:26, miu wrote:
> naming: Based on the way this variable is used, it seems like it should be
named
> |remote_rendering_started_|. (and to avoid confusion between this variable and
> the ShouldBeRemoting() helper method)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller.h:86: // This will be replaced by
the remoting source in RemotingCdmController
On 2016/10/25 04:21:26, miu wrote:
> For clarification: "This is initially the RemotingSourceImpl passed to the
ctor,
> and might be replaced with a different instance later if OnSetCdm() is
called."

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_renderer_controller_unittest.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_controller_unittest.cc:154:
remoting_source_impl->OnSinkAvailable();
On 2016/10/25 04:21:26, miu wrote:
> You should add a call to RunUntilIdle() and EXPECT_FALSE(...) after each of
the
> method calls. While we know RemotingSourceImpl won't post any tasks, the test
> shouldn't know this. In other words, this test code should give
> RemotingSourceImpl a chance to do the wrong thing. ;)
> 
>   remoting_controller_->SetSwitchRendererCallback(base::Bind(
>       &RemotingRendererControllerTest::ToggleRenderer,
base::Unretained(this)));
>   RunUntilIdle();
>   EXPECT_FALSE(is_remoting_);
>   remoting_source_impl->OnSinkAvailable();
>   RunUntilIdle();
>   EXPECT_FALSE(is_remoting_);
>   remoting_controller_->OnEnteredFullscreen();
>   RunUntilIdle();
>   EXPECT_FALSE(is_remoting_);
>   remoting_controller_->OnMetadataChanged(defaultMetadata());
>   RunUntilIdle();
>   EXPECT_TRUE(is_remoting_);
> 
> ...and the same thing in the StartFailed test.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_renderer_factory.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_renderer_factory.cc:26:
remoting_controller_->IsTerminated())) {
On 2016/10/25 04:21:26, miu wrote:
> Seems like this should be:
> 
>   if (remoting_controller_ &&
>       remoting_controller_->IsRemoting() &&
>       !remoting_controller_->IsTerminated()) {
> 
> Rather than having two separate IsRemoting() and IsTerminated() methods, you
> might just combine them and rename to something like IsRenderingRemotely().

Renamed IsRemoting() to IsRenderingRemotely(). I originally thought that we
should switch to remoting renderer if remoting session is started or is
permanently terminated. On a second thought, I think for the latter, we may just
create a separate renderer to only render that failure page (with apacible's
change). So now I separated the two cases. WDYT?

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_source_impl.cc (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:20:
UpdateAndNotifyState(RemotingSessionState::SESSION_PERMANENTLY_STOPPED);
On 2016/10/25 04:21:27, miu wrote:
> Instead of this, consider calling Shutdown() so that remoter_->Stop() is
called
> if needed.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:41: if (state_ ==
RemotingSessionState::SESSION_STARTED) {
On 2016/10/25 04:21:27, miu wrote:
> Or if in the SESSION_STARTING state too, right?

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:42:
remoter_->Stop(mojom::RemotingStopReason::ROUTE_TERMINATED);
On 2016/10/25 04:21:27, miu wrote:
> Actually, you shouldn't need to call Stop() here. OnSinkGone() implies
> OnStopped() will be called soon. You could add a helpful comment here like:
> "Remoting is being shut down from the other end."

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:49: if (!is_sink_available_ ||
clients_.empty() ||
On 2016/10/25 04:21:26, miu wrote:
> The "!is_sink_available_" shouldn't be needed. (There would be a consistency
> problem if OnStarted() were called after OnSinkGone().)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:54:
remoter_->Stop(mojom::RemotingStopReason::ROUTE_TERMINATED);
On 2016/10/25 04:21:27, miu wrote:
> The reason should be LOCAL_PLAYBACK since either there are no
> RemotingRenderers/CDMs or this current session is permanently stopped.
> (ROUTE_TERMINATED was meant for shutting down remoting via the Media Router
> dialog.)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:70: state_ = is_sink_available_ ?
RemotingSessionState::SESSION_CAN_START
On 2016/10/25 04:21:27, miu wrote:
> This should just be "state_ = SESSION_UNAVAILABLE" because is_sink_available_
> should always be false at this point. Also, if you look at the possible
> RemotingStartFailReasons, you would not want to set "state_ =
SESSION_CAN_START"
> until OnSinkAvailable() gets called again.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:78: RemotingSessionState state =
is_sink_available_
On 2016/10/25 04:21:27, miu wrote:
> This should just be "state_ = SESSION_UNAVAILABLE" because there will be a
later
> call to OnSinkAvailable(), and that's where you can set "state_ =
> SESSION_CAN_START".

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:146: if (clients_.empty() && state_ ==
RemotingSessionState::SESSION_STARTED) {
On 2016/10/25 04:21:27, miu wrote:
> Or if in the SESSION_STARTING state too, right?

My original thought was to call Stop() in OnStarted() when session is in
SESSION_STARTING state and there is no client, or ShutDown() is called, or
StopRemoting() is called, and is in the SESSION_STARTING state. Now changed to
call Stop() immediately when any of these happen. This might be more readable.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.cc:153: if (state_ ==
RemotingSessionState::SESSION_STARTED)
On 2016/10/25 04:21:27, miu wrote:
> ditto: We want to call Stop() if SESSION_STARTING.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
File media/remoting/remoting_source_impl.h (right):

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:13: namespace base {
On 2016/10/25 04:21:27, miu wrote:
> Please remove this forward declaration and instead #include
> "base/threading/thread_checker.h" The RemotingSourceImpl class declaration
below
> is only compiling because one of the #includes above is pulling-in the full
> declaration of ThreadChecker for you. ;)

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:42: // 3) Any client requests to
permanently terminated the session.
On 2016/10/25 04:21:27, miu wrote:
> s/terminated/terminate/

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:44: class RemotingSourceImpl final
On 2016/10/25 04:21:27, miu wrote:
> Another helpful thing to add to the class-level comment:
> 
>   // This class is ref-counted because, in some cases, an instance will have
> shared ownership between RemotingRendererController and RemotingCdmController.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:51: class Client {
On 2016/10/25 04:21:27, miu wrote:
> style nit: Type declarations have to go at the top (just after "public:").

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:99: mojom::RemoterPtr remoter_;
On 2016/10/25 04:21:27, miu wrote:
> const please

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:106: bool is_sink_available_ = false;
On 2016/10/25 04:21:27, miu wrote:
> You can remove this boolean. See comments in .cc file. After making changes in
> the .cc file, I think you'll notice that |is_sink_available_| is no longer
used.

Done.

https://codereview.chromium.org/2406483002/diff/100001/media/remoting/remotin...
media/remoting/remoting_source_impl.h:109: std::set<Client*> clients_;
On 2016/10/25 04:21:27, miu wrote:
> Use std::vector<Client*> instead (saves memory and CPU runtime overhead
because
> we expect only one or two clients).

Done.

Powered by Google App Engine
This is Rietveld 408576698