Index: chrome/browser/media/router/presentation_service_delegate_impl.h |
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.h b/chrome/browser/media/router/presentation_service_delegate_impl.h |
index c26adbf43e3eb5fad4de41891fbe4502846a3ec0..3a0eab4f816e7b0904db661b46b56cbe9e86f1a4 100644 |
--- a/chrome/browser/media/router/presentation_service_delegate_impl.h |
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.h |
@@ -16,6 +16,7 @@ |
#include "base/observer_list.h" |
#include "chrome/browser/media/router/media_router.h" |
#include "chrome/browser/media/router/media_source.h" |
+#include "chrome/browser/media/router/render_frame_host_helper.h" |
#include "content/public/browser/presentation_service_delegate.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/browser/web_contents_user_data.h" |
@@ -32,6 +33,7 @@ namespace media_router { |
class MediaRoute; |
class MediaSinksObserver; |
+class OneUAPresentationRouter; |
class PresentationFrameManager; |
class PresentationSessionStateObserver; |
@@ -93,15 +95,24 @@ class PresentationServiceDelegateImpl |
int render_frame_id, |
const content::PresentationSessionInfo& session, |
const content::PresentationSessionMessageCallback& message_cb) override; |
- void SendMessage(int render_process_id, |
- int render_frame_id, |
- const content::PresentationSessionInfo& session, |
- scoped_ptr<content::PresentationSessionMessage> message, |
- const SendMessageCallback& send_message_cb) override; |
+ void SendMessage( |
+ int render_process_id, |
+ int render_frame_id, |
+ const content::PresentationSessionInfo& session, |
+ scoped_ptr<content::PresentationSessionMessage> message, |
+ const content::SendMessageCallback& send_message_cb) override; |
void ListenForSessionStateChange( |
int render_process_id, |
int render_frame_id, |
const content::SessionStateChangedCallback& state_changed_cb) override; |
+ void GetPresenterSession( |
mark a. foltz
2015/09/11 23:24:20
FWIW, the terminology in the spec group is moving
imcheng
2015/09/26 01:21:57
Done.
|
+ int render_process_id, |
+ int render_frame_id, |
+ const content::PresenterSessionAvailableCallback& success_callback, |
+ const base::Callback<void(const std::string&)>& error_callback) override; |
+ std::vector<content::PresentationSessionInfo> GetPresenterSessions( |
+ int render_process_id, |
+ int render_frame_id) override; |
// Callback invoked when there is a route response from CreateRoute/JoinRoute |
// outside of a Presentation API request. This could be due to |
@@ -109,7 +120,8 @@ class PresentationServiceDelegateImpl |
// a media route provider (e.g., autojoin). |
void OnRouteResponse(const MediaRoute* route, |
const std::string& presentation_id, |
- const std::string& error); |
+ const std::string& error, |
+ bool is_one_ua_presentation); |
// Returns the default MediaSource for this tab if there is one. |
// Returns an empty MediaSource otherwise. |
@@ -164,14 +176,16 @@ class PresentationServiceDelegateImpl |
const PresentationSessionErrorCallback& error_cb, |
const MediaRoute* route, |
const std::string& presentation_id, |
- const std::string& error_text); |
+ const std::string& error_text, |
+ bool is_one_ua_presentation); |
void OnStartSessionSucceeded( |
int render_process_id, |
int render_frame_id, |
const PresentationSessionSuccessCallback& success_cb, |
const content::PresentationSessionInfo& new_session, |
- const MediaRoute::Id& route_id); |
+ const MediaRoute::Id& route_id, |
mark a. foltz
2015/09/11 23:24:20
Can we pass the MediaRoute* here and ask if it's a
imcheng
2015/09/26 01:21:57
Done.
|
+ bool is_one_ua_presentation); |
// Returns |true| if the frame is the main frame of |web_contents_|. |
bool IsMainFrame(int render_process_id, int render_frame_id) const; |
@@ -182,6 +196,10 @@ class PresentationServiceDelegateImpl |
const MediaSource& new_default_source, |
const GURL& new_default_frame_url); |
+ void RegisterOneUAPresentationController( |
+ const content::PresentationSessionInfo& session, |
+ const RenderFrameHostId& controller_frame_id); |
+ |
// Default MediaSource for the tab associated with this instance. |
MediaSource default_source_; |
// URL of the frame that contains the default MediaSource. |
@@ -192,9 +210,10 @@ class PresentationServiceDelegateImpl |
DefaultMediaSourceObserver> default_media_source_observers_; |
// References to the WebContents that owns this instance, and associated |
- // browser profile's MediaRouter instance. |
- content::WebContents* web_contents_; |
+ // browser profile's MediaRouter/OneUAPresentationRouter instances. |
+ content::WebContents* const web_contents_; |
MediaRouter* router_; |
+ OneUAPresentationRouter* const one_ua_presentation_router_; |
scoped_ptr<PresentationFrameManager> frame_manager_; |