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 df276101817b84457e4d5f89f3ab08bffc4f3997..b6541e24614f9fa89f21bd7a90e83d6cb51ce168 100644 |
--- a/chrome/browser/media/router/offscreen_presentation_manager.h |
+++ b/chrome/browser/media/router/offscreen_presentation_manager.h |
@@ -18,20 +18,6 @@ |
class GURL; |
-// TODO(zhaobin): move these back to |
-// content/public/browser/presentation_service_delegate.h when they are actually |
-// used in content. |
-namespace content { |
-// TODO(zhaobin): A class stub for blink::mojom::PresentationConnectionPtr. |
-// presentation.mojom is under security review. Change this to |
-// blink::mojom::PresentationConnectionPtr once that is done. |
-class PresentationConnectionPtr {}; |
- |
-using ReceiverConnectionAvailableCallback = |
- base::Callback<void(const content::PresentationSessionInfo&, |
- PresentationConnectionPtr)>; |
-} // namespace content |
- |
namespace media_router { |
// Manages all offscreen presentations started in the associated Profile and |
// facilitates communication between the controllers and the receiver of an |
@@ -114,7 +100,7 @@ class OffscreenPresentationManager : public KeyedService { |
// exists. |
// |controller|: Not owned by this class. Ownership is transferred to the |
// presentation receiver via |receiver_callback| passed below. |
- void RegisterOffscreenPresentationController( |
+ virtual void RegisterOffscreenPresentationController( |
const std::string& presentation_id, |
const GURL& presentation_url, |
const RenderFrameHostId& render_frame_id, |
@@ -125,20 +111,20 @@ class OffscreenPresentationManager : public KeyedService { |
// controller that matches the provided arguments. It removes presentation |
// that matches the arguments if the presentation has no receiver_callback and |
// any other pending controller. |
- void UnregisterOffscreenPresentationController( |
+ virtual void UnregisterOffscreenPresentationController( |
const std::string& presentation_id, |
const RenderFrameHostId& render_frame_id); |
// Registers ReceiverConnectionAvailableCallback to presentation |
// with |presentation_id|. |
- void OnOffscreenPresentationReceiverCreated( |
+ virtual void OnOffscreenPresentationReceiverCreated( |
const std::string& presentation_id, |
const GURL& presentation_url, |
const content::ReceiverConnectionAvailableCallback& receiver_callback); |
// Unregisters the ReceiverConnectionAvailableCallback associated with |
// |presentation_id|. |
- void OnOffscreenPresentationReceiverTerminated( |
+ virtual void OnOffscreenPresentationReceiverTerminated( |
const std::string& presentation_id); |
private: |
@@ -198,6 +184,9 @@ class OffscreenPresentationManager : public KeyedService { |
private: |
friend class OffscreenPresentationManagerFactory; |
friend class OffscreenPresentationManagerTest; |
+ friend class MockOffscreenPresentationManager; |
+ FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
+ ConnectToOffscreenPresentation); |
// Used by OffscreenPresentationManagerFactory::GetOrCreateForBrowserContext. |
OffscreenPresentationManager(); |