Index: content/renderer/presentation/presentation_dispatcher.h |
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h |
index 03cdf46eb009d9283eb4406b8139aad28336af7e..0bdf60385b20f8b51e08e59b5fdf5e393aa622d9 100644 |
--- a/content/renderer/presentation/presentation_dispatcher.h |
+++ b/content/renderer/presentation/presentation_dispatcher.h |
@@ -36,6 +36,8 @@ class WebVector; |
namespace content { |
+class TestPresentationDispatcher; |
+ |
// PresentationDispatcher is a delegate for Presentation API messages used by |
// Blink. It forwards the calls to the Mojo PresentationService. |
class CONTENT_EXPORT PresentationDispatcher |
@@ -47,6 +49,19 @@ class CONTENT_EXPORT PresentationDispatcher |
~PresentationDispatcher() override; |
private: |
+ friend class TestPresentationDispatcher; |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestStartSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestJoinSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendString); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendArrayBuffer); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendBlobData); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestCloseSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestTerminateSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, |
+ TestListenForScreenAvailability); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, |
+ TestSetDefaultPresentationUrls); |
+ |
struct SendMessageRequest { |
SendMessageRequest(blink::mojom::PresentationSessionInfoPtr session_info, |
blink::mojom::ConnectionMessagePtr message); |
@@ -139,7 +154,7 @@ class CONTENT_EXPORT PresentationDispatcher |
void DoSendMessage(SendMessageRequest* request); |
void HandleSendMessageRequests(bool success); |
- void ConnectToPresentationServiceIfNeeded(); |
+ virtual void ConnectToPresentationServiceIfNeeded(); |
void UpdateListeningState(); |