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

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

Issue 2714783002: [Presentation API] (browser side) Implement reconnect() for 1-UA mode (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/media/router/offscreen_presentation_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/offscreen_presentation_manager.h
diff --git a/chrome/browser/media/router/offscreen_presentation_manager.h b/chrome/browser/media/router/offscreen_presentation_manager.h
index d3a3dabfa8d6f9028898bc54ab51c33376d21012..b0e62130ce44dc7634b214e5b4c004f9246baa2a 100644
--- a/chrome/browser/media/router/offscreen_presentation_manager.h
+++ b/chrome/browser/media/router/offscreen_presentation_manager.h
@@ -11,7 +11,9 @@
#include <unordered_map>
#include "base/macros.h"
+#include "base/optional.h"
#include "base/threading/thread_checker.h"
+#include "chrome/browser/media/router/media_route.h"
#include "chrome/browser/media/router/render_frame_host_id.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/presentation_service_delegate.h"
@@ -110,7 +112,8 @@ class OffscreenPresentationManager : public KeyedService {
const GURL& presentation_url,
const RenderFrameHostId& render_frame_id,
content::PresentationConnectionPtr controller_connection_ptr,
- content::PresentationConnectionRequest receiver_connection_request);
+ content::PresentationConnectionRequest receiver_connection_request,
+ const MediaRoute& route);
// Unregisters controller PresentationConnectionPtr to presentation with
// |presentation_id|, |render_frame_id|. It does nothing if there is no
@@ -133,6 +136,14 @@ class OffscreenPresentationManager : public KeyedService {
virtual void OnOffscreenPresentationReceiverTerminated(
const std::string& presentation_id);
+ // Returns true if this class has an offscreen presentation with
+ // |presentation_id|.
+ virtual bool IsOffscreenPresentation(const std::string& presentation_id);
+
+ // Returns nullptr if |presentation_id| is not associated with an offscreen
+ // presentation.
+ virtual const MediaRoute* GetRoute(const std::string& presentation_id);
+
private:
// Represents an offscreen presentation registered with
// OffscreenPresentationManager. Contains callback to the receiver to inform
@@ -154,7 +165,8 @@ class OffscreenPresentationManager : public KeyedService {
void RegisterController(
const RenderFrameHostId& render_frame_id,
content::PresentationConnectionPtr controller_connection_ptr,
- content::PresentationConnectionRequest receiver_connection_request);
+ content::PresentationConnectionRequest receiver_connection_request,
+ const MediaRoute& route);
// Unregister controller with |render_frame_id|. Do nothing if there is no
// pending controller with |render_frame_id|.
@@ -177,6 +189,7 @@ class OffscreenPresentationManager : public KeyedService {
const std::string presentation_id_;
const GURL presentation_url_;
+ base::Optional<MediaRoute> route_;
// Callback to invoke whenever a receiver connection is available.
content::ReceiverConnectionAvailableCallback receiver_callback_;
« no previous file with comments | « no previous file | chrome/browser/media/router/offscreen_presentation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698