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

Side by Side Diff: third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: resolve code review comments from Mark Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebPresentationClient_h 5 #ifndef WebPresentationClient_h
6 #define WebPresentationClient_h 6 #define WebPresentationClient_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebCommon.h" 9 #include "public/platform/WebCommon.h"
10 10
11 #include <memory> 11 #include <memory>
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class WebPresentationAvailabilityObserver; 15 class WebPresentationAvailabilityObserver;
16 class WebPresentationController; 16 class WebPresentationController;
17 class WebPresentationConnectionClient; 17 class WebPresentationConnectionClient;
18 class WebPresentationConnectionProxy;
18 class WebPresentationReceiver; 19 class WebPresentationReceiver;
19 class WebString; 20 class WebString;
20 class WebURL; 21 class WebURL;
21 struct WebPresentationError; 22 struct WebPresentationError;
22 template <typename T> 23 template <typename T>
23 class WebVector; 24 class WebVector;
24 25
25 // If session was created, callback's onSuccess() is invoked with the 26 // If session was created, callback's onSuccess() is invoked with the
26 // information about the presentation session created by the embedder. 27 // information about the presentation session created by the embedder.
27 // Otherwise, onError() is invoked with the error code and message. 28 // Otherwise, onError() is invoked with the error code and message.
(...skipping 25 matching lines...) Expand all
53 // Called when the frame requests to join an existing session. 54 // Called when the frame requests to join an existing session.
54 // The ownership of the |callbacks| argument is transferred to the embedder. 55 // The ownership of the |callbacks| argument is transferred to the embedder.
55 virtual void joinSession(const WebVector<WebURL>& presentationUrls, 56 virtual void joinSession(const WebVector<WebURL>& presentationUrls,
56 const WebString& presentationId, 57 const WebString& presentationId,
57 WebPresentationConnectionClientCallbacks*) = 0; 58 WebPresentationConnectionClientCallbacks*) = 0;
58 59
59 // Called when the frame requests to send String message to an existing 60 // Called when the frame requests to send String message to an existing
60 // session. 61 // session.
61 virtual void sendString(const WebURL& presentationUrl, 62 virtual void sendString(const WebURL& presentationUrl,
62 const WebString& presentationId, 63 const WebString& presentationId,
63 const WebString& message) = 0; 64 const WebString& message,
65 const WebPresentationConnectionProxy*) = 0;
64 66
65 // Called when the frame requests to send ArrayBuffer/View data to an existing 67 // Called when the frame requests to send ArrayBuffer/View data to an existing
66 // session. Embedder copies the |data| and the ownership is not transferred. 68 // session. Embedder copies the |data| and the ownership is not transferred.
67 virtual void sendArrayBuffer(const WebURL& presentationUrl, 69 virtual void sendArrayBuffer(const WebURL& presentationUrl,
68 const WebString& presentationId, 70 const WebString& presentationId,
69 const uint8_t* data, 71 const uint8_t* data,
70 size_t length) = 0; 72 size_t length,
73 const WebPresentationConnectionProxy*) = 0;
71 74
72 // Called when the frame requests to send Blob data to an existing session. 75 // Called when the frame requests to send Blob data to an existing session.
73 // Embedder copies the |data| and the ownership is not transferred. 76 // Embedder copies the |data| and the ownership is not transferred.
74 virtual void sendBlobData(const WebURL& presentationUrl, 77 virtual void sendBlobData(const WebURL& presentationUrl,
75 const WebString& presentationId, 78 const WebString& presentationId,
76 const uint8_t* data, 79 const uint8_t* data,
77 size_t length) = 0; 80 size_t length,
81 const WebPresentationConnectionProxy*) = 0;
78 82
79 // Called when the frame requests to close an existing session. 83 // Called when the frame requests to close an existing session.
80 virtual void closeSession(const WebURL& presentationUrl, 84 virtual void closeSession(const WebURL& presentationUrl,
81 const WebString& presentationId) = 0; 85 const WebString& presentationId) = 0;
82 86
83 // Called when the frame requests to terminate an existing session. 87 // Called when the frame requests to terminate an existing session.
84 virtual void terminateSession(const WebURL& presentationUrl, 88 virtual void terminateSession(const WebURL& presentationUrl,
85 const WebString& presentationId) = 0; 89 const WebString& presentationId) = 0;
86 90
87 // Called when the frame wants to know the availability of a presentation 91 // Called when the frame wants to know the availability of a presentation
(...skipping 12 matching lines...) Expand all
100 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; 104 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0;
101 105
102 // Called when a defaultRequest has been set. It sends the url associated 106 // Called when a defaultRequest has been set. It sends the url associated
103 // with it for the embedder. 107 // with it for the embedder.
104 virtual void setDefaultPresentationUrls(const WebVector<WebURL>&) = 0; 108 virtual void setDefaultPresentationUrls(const WebVector<WebURL>&) = 0;
105 }; 109 };
106 110
107 } // namespace blink 111 } // namespace blink
108 112
109 #endif // WebPresentationClient_h 113 #endif // WebPresentationClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698