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

Unified Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: add unit test for browser_presentation_connection_proxy Created 3 years, 11 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: content/renderer/presentation/presentation_dispatcher.h
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h
index d8462f841ac73c8c8addf415ddea19b3c37836c7..2339eb07b5ea528914ec9bdc3a9b4087230352af 100644
--- a/content/renderer/presentation/presentation_dispatcher.h
+++ b/content/renderer/presentation/presentation_dispatcher.h
@@ -27,6 +27,7 @@
namespace blink {
class WebPresentationAvailabilityObserver;
+class WebPresentationConnection;
class WebPresentationReceiver;
class WebString;
class WebURL;
@@ -61,6 +62,8 @@ class CONTENT_EXPORT PresentationDispatcher
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendString);
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendArrayBuffer);
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendBlobData);
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest,
+ TestOnReceiverConnectionAvailable);
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestCloseSession);
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestTerminateSession);
FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest,
@@ -174,6 +177,18 @@ class CONTENT_EXPORT PresentationDispatcher
void DoSendMessage(SendMessageRequest* request);
void HandleSendMessageRequests(bool success);
+ // Creates ControllerConnectionProxy object |controller_connection_proxy| with
+ // |connection|. Sends mojo interface ptr of |controller_connection_proxy|
+ // and mojo interface request of |controller_connection_proxy|'s
+ // |target_connection_| to PresentationService.
+ // |session_info|: |connection|'s id and url;
+ // |connection|: |controller_connection_proxy|'s |source_connection_|. Raw
+ // pointer to Blink connection owning proxy object. It does not take object
+ // ownership.
+ void SetControllerConnection(
+ blink::mojom::PresentationSessionInfoPtr session_info,
+ blink::WebPresentationConnection* connection);
+
virtual void ConnectToPresentationServiceIfNeeded();
void UpdateListeningState();

Powered by Google App Engine
This is Rietveld 408576698