Chromium Code Reviews| Index: content/public/browser/presentation_service_delegate.h |
| diff --git a/content/public/browser/presentation_service_delegate.h b/content/public/browser/presentation_service_delegate.h |
| index 3005609e936722a0eb1051965e1db2446c3e758a..06de9269f3c84fd40936ee83f662ede729826124 100644 |
| --- a/content/public/browser/presentation_service_delegate.h |
| +++ b/content/public/browser/presentation_service_delegate.h |
| @@ -26,6 +26,11 @@ class PresentationSessionStateListener; |
| using PresentationSessionMessageCallback = base::Callback< |
| void(const ScopedVector<content::PresentationSessionMessage>&, bool)>; |
| +using PresentationReceiverSessionAvailableCallback = |
| + base::Callback<void(const content::PresentationSessionInfo*)>; |
| + |
| +using SendMessageCallback = base::Callback<void(bool)>; |
| + |
| // An interface implemented by embedders to handle presentation API calls |
| // forwarded from PresentationServiceImpl. |
| class CONTENT_EXPORT PresentationServiceDelegate { |
| @@ -51,7 +56,6 @@ class CONTENT_EXPORT PresentationServiceDelegate { |
| base::Callback<void(const PresentationSessionInfo&)>; |
| using PresentationSessionErrorCallback = |
| base::Callback<void(const PresentationError&)>; |
| - using SendMessageCallback = base::Callback<void(bool)>; |
| virtual ~PresentationServiceDelegate() {} |
| @@ -179,6 +183,32 @@ class CONTENT_EXPORT PresentationServiceDelegate { |
| int render_process_id, |
| int render_frame_id, |
| content::PresentationSessionStateListener* listener) = 0; |
| + |
| + // Gets a receiver presentation session for the offscreen presentation hosted |
| + // on the offscreen tab containing this frame, or waits until one is |
| + // available. |
|
mark a. foltz
2015/10/12 21:56:10
Registers a callback to be notified when the offsc
miu
2015/10/14 01:54:57
I'm not sure "register" is the right verb here, th
|
| + // Runs |callback| once the receiver becomes available. |callback| will be |
| + // run during this method call if the receiver is already available, or at |
| + // some later time when a receiver presentation session becomes available. |
| + // It is possible that |callback| will never be run if a receiver never |
| + // becomes available. |
| + // If |render_process_id| and |render_frame_id| do not refer to the main |
| + // render frame of this WebContents, |callback| will be immediately invoked |
| + // with null. |
| + virtual void NotifyWhenReceiverSessionIsAvailable( |
| + int render_process_id, |
| + int render_frame_id, |
| + const PresentationReceiverSessionAvailableCallback& callback) = 0; |
| + |
| + // Gets all receiver presentation sessions for the offscreen presentation |
| + // hosted on the offscreen tab containing this frame. |
|
mark a. foltz
2015/10/12 21:56:10
Returns all presentation sessions for the offscree
imcheng
2015/10/17 01:00:24
Done.
|
| + // Unlike |GetPresentationReceiverSession|, this method immediately returns |
|
miu
2015/10/14 01:54:57
This part of the comment is stale now (GetPresenta
imcheng
2015/10/17 01:00:24
Done.
|
| + // all receiver sessions that are currently available. |
| + // If |render_process_id| and |render_frame_id| do not refer to the main |
| + // render frame of this WebContents, an empty vector will be returned. |
| + virtual std::vector<content::PresentationSessionInfo> |
|
miu
2015/10/14 01:54:57
style: Per style guide, consider having the caller
imcheng
2015/10/17 01:00:24
Done.
|
| + GetPresentationReceiverSessions(int render_process_id, |
| + int render_frame_id) = 0; |
| }; |
| } // namespace content |