Add MediaExperimentManager::ScopedPlayerState.

To allow clients to change the player state, this CL adds
MediaExperimentManager::ScopedPlayerState.  This class provides
access to MediaExperimentManager::PlayerState via the -> operator,
and notifies the manager when it goes out of scope.

This is mostly a convenience to remove the need for accessor
methods on the manager.  However, it also lets the client modify
multiple properties of a player atomically, before the manager
tries to check for changes to trigger experiment notifications.

Change-Id: Icc80f17598aeccfd3d660df869281fabfc7545cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595115
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657137}
3 files changed