Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl.h

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 aa80c64bbb62cd88530f508dd1648206eefac9e1..dda2be4a1d9d33e9393fc68a2d2ba977a839095e 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 OffscreenPresentationManager;
class PresentationFrameManager;
class PresentationSessionStateObserver;
@@ -93,15 +95,25 @@ 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;
bool ListenForSessionStateChange(
int render_process_id,
int render_frame_id,
content::PresentationSessionStateListener* listener) override;
+ void GetPresentationReceiverSession(
+ int render_process_id,
+ int render_frame_id,
+ const content::PresentationReceiverSessionAvailableCallback&
+ success_callback,
+ const base::Callback<void(const std::string&)>& error_callback) override;
+ std::vector<content::PresentationSessionInfo> GetPresentationReceiverSessions(
+ 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
@@ -173,7 +185,7 @@ class PresentationServiceDelegateImpl
int render_frame_id,
const PresentationSessionSuccessCallback& success_cb,
const content::PresentationSessionInfo& new_session,
- const MediaRoute::Id& route_id);
+ const MediaRoute& route);
// Returns |true| if the frame is the main frame of |web_contents_|.
bool IsMainFrame(int render_process_id, int render_frame_id) const;
@@ -184,6 +196,10 @@ class PresentationServiceDelegateImpl
const MediaSource& new_default_source,
const GURL& new_default_frame_url);
+ void RegisterOffscreenPresentationController(
+ 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.
@@ -194,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/OffscreenPresentationManager instances.
+ content::WebContents* const web_contents_;
MediaRouter* router_;
+ OffscreenPresentationManager* const offscreen_presentation_manager_;
scoped_ptr<PresentationFrameManager> frame_manager_;

Powered by Google App Engine
This is Rietveld 408576698