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..67679eeac5b750d6b1bd11a18c72deee69a2c1b1 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,28 @@ 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 |
miu
2015/10/07 21:51:47
The wording in this comment was a bit confusing to
imcheng
2015/10/10 04:39:44
Done. If a receiver session never becomes availabl
|
+ // on the offscreen tab containing this frame, or waits until one is |
+ // available. |
+ // If there is at least one receiver presentation session, |callback| will |
+ // be invoked with one of the sessions immediately. |
+ // Otherwise, |callback| will be invoked when a receiver presentation session |
+ // becomes available. |
+ // If the calling frame is not the main frame of an offscreen tab, |
+ // |callback| will be invoked with null. |
+ virtual void GetPresentationReceiverSession( |
miu
2015/10/07 21:51:47
Consider naming this method something like NotifyW
imcheng
2015/10/10 04:39:44
Renamed per your suggestion. I am not a fan of the
|
+ 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. |
+ // If the calling frame is not the main frame of an offscreen tab, an empty |
+ // vector will be returned. |
+ virtual std::vector<content::PresentationSessionInfo> |
+ GetPresentationReceiverSessions(int render_process_id, |
+ int render_frame_id) = 0; |
}; |
} // namespace content |