 Chromium Code Reviews
 Chromium Code Reviews Issue 
            1478643002:
    Refactor media out of WebContentsImpl to MediaWebContentsObserver.  (Closed)
    
  
    Issue 
            1478643002:
    Refactor media out of WebContentsImpl to MediaWebContentsObserver.  (Closed) 
  | DescriptionRefactor media out of WebContentsImpl to MediaWebContentsObserver.
Pulls out the power save blocker management into the existing media
WebContentsObserver in preparation for sharing the desktop and
Android code paths for media playback.
MediaWebContentsObserver will become a MediaObserver in the future
and pass back playback control messages for both the android and
desktop implementations.
This is mostly just a cleanup without any functionality change,
except for:
- A fix to SiteEngagementHelper which was assuming there was
only one player sending notifications per WebContents.
- A change to the WebContentsObserver API to make the above
clearer to future implementors.
- A change to when the WCO API is called to make sure pause only
comes after play for implementor sanity. Previously a pause may
come during player destruction as well, even if a play was never
seen.
It gets a little weird extracting this functionality from the
WebContentsImpl implementation since it is still responsible for
vending play/pause observer notifications. Suggestions welcome!
BUG=529887
TEST=existing unit tests still pass.
Committed: https://crrev.com/88c24007f6dc13d7e9e6b249e734ba5b668e8023
Cr-Commit-Position: refs/heads/master@{#363906}
   Patch Set 1 #Patch Set 2 : Finish. #Patch Set 3 : Remove cruft. #
      Total comments: 15
      
     Patch Set 4 : Fix bugs. Add sanity test. #Patch Set 5 : Fix android. #
      Total comments: 2
      
     Patch Set 6 : Rename. Rebase. Fix. #Patch Set 7 : Fix namespace for cast. #Messages
    Total messages: 34 (14 generated)
     |