diff options
author | imcheng <imcheng@google.com> | 2015-07-10 14:14:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-10 21:15:07 +0000 |
commit | 1709d154402ecbdf4a537ae416f30042c22d9cba (patch) | |
tree | f6948ac1e09a8bf0f0f707d3dd99c810b91c546a /content/public/browser/presentation_service_delegate.h | |
parent | 5975003cd7b19d76e238581d0e7f2f8ee7478dba (diff) | |
download | chromium_src-1709d154402ecbdf4a537ae416f30042c22d9cba.zip chromium_src-1709d154402ecbdf4a537ae416f30042c22d9cba.tar.gz chromium_src-1709d154402ecbdf4a537ae416f30042c22d9cba.tar.bz2 |
[Media Router] onsessionstatechange Media Router implementation.
- New PresentationServiceDelegate API to listen for session state
changes for all presentations in a given frame.
- New PresentationSessionStateObserver class (owned by
PresentationFrame) to track connected/disconnected state of specified
presentation routes by implementing MediaRoutesObserver.
BUG=504938
Review URL: https://codereview.chromium.org/1228493007
Cr-Commit-Position: refs/heads/master@{#338356}
Diffstat (limited to 'content/public/browser/presentation_service_delegate.h')
-rw-r--r-- | content/public/browser/presentation_service_delegate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/public/browser/presentation_service_delegate.h b/content/public/browser/presentation_service_delegate.h index 217c1fd..4f8e5e5 100644 --- a/content/public/browser/presentation_service_delegate.h +++ b/content/public/browser/presentation_service_delegate.h @@ -18,6 +18,10 @@ namespace content { class PresentationScreenAvailabilityListener; +using SessionStateChangedCallback = + base::Callback<void(const PresentationSessionInfo&, + PresentationSessionState)>; + // An interface implemented by embedders to handle presentation API calls // forwarded from PresentationServiceImpl. class CONTENT_EXPORT PresentationServiceDelegate { @@ -159,6 +163,15 @@ class CONTENT_EXPORT PresentationServiceDelegate { int render_frame_id, scoped_ptr<PresentationSessionMessage> message_request, const SendMessageCallback& send_message_cb) = 0; + + // Continuously listen for presentation session state changes for a frame. + // |render_process_id|, |render_frame_id|: ID of frame. + // |state_changed_cb|: Invoked with the session and its new state whenever + // there is a state change. + virtual void ListenForSessionStateChange( + int render_process_id, + int render_frame_id, + const SessionStateChangedCallback& state_changed_cb) = 0; }; } // namespace content |