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

Side by Side Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Make changes requested by danakj, fix a few more headers 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 CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 blink::mojom::PresentationMessageType type, 63 blink::mojom::PresentationMessageType type,
64 const uint8_t* data, 64 const uint8_t* data,
65 size_t length); 65 size_t length);
66 66
67 // WebPresentationClient implementation. 67 // WebPresentationClient implementation.
68 void setController(blink::WebPresentationController* controller) override; 68 void setController(blink::WebPresentationController* controller) override;
69 void setReceiver(blink::WebPresentationReceiver*) override; 69 void setReceiver(blink::WebPresentationReceiver*) override;
70 70
71 void startSession( 71 void startSession(
72 const blink::WebVector<blink::WebURL>& presentationUrls, 72 const blink::WebVector<blink::WebURL>& presentationUrls,
73 blink::WebPresentationConnectionClientCallbacks* callback) override; 73 std::unique_ptr<blink::WebPresentationConnectionClientCallbacks> callback)
74 override;
74 void joinSession( 75 void joinSession(
75 const blink::WebVector<blink::WebURL>& presentationUrls, 76 const blink::WebVector<blink::WebURL>& presentationUrls,
76 const blink::WebString& presentationId, 77 const blink::WebString& presentationId,
77 blink::WebPresentationConnectionClientCallbacks* callback) override; 78 std::unique_ptr<blink::WebPresentationConnectionClientCallbacks> callback)
79 override;
78 void sendString(const blink::WebURL& presentationUrl, 80 void sendString(const blink::WebURL& presentationUrl,
79 const blink::WebString& presentationId, 81 const blink::WebString& presentationId,
80 const blink::WebString& message) override; 82 const blink::WebString& message) override;
81 void sendArrayBuffer(const blink::WebURL& presentationUrl, 83 void sendArrayBuffer(const blink::WebURL& presentationUrl,
82 const blink::WebString& presentationId, 84 const blink::WebString& presentationId,
83 const uint8_t* data, 85 const uint8_t* data,
84 size_t length) override; 86 size_t length) override;
85 void sendBlobData(const blink::WebURL& presentationUrl, 87 void sendBlobData(const blink::WebURL& presentationUrl,
86 const blink::WebString& presentationId, 88 const blink::WebString& presentationId,
87 const uint8_t* data, 89 const uint8_t* data,
88 size_t length) override; 90 size_t length) override;
89 void closeSession(const blink::WebURL& presentationUrl, 91 void closeSession(const blink::WebURL& presentationUrl,
90 const blink::WebString& presentationId) override; 92 const blink::WebString& presentationId) override;
91 void terminateSession(const blink::WebURL& presentationUrl, 93 void terminateSession(const blink::WebURL& presentationUrl,
92 const blink::WebString& presentationId) override; 94 const blink::WebString& presentationId) override;
93 void getAvailability( 95 void getAvailability(
94 const blink::WebURL& availabilityUrl, 96 const blink::WebURL& availabilityUrl,
95 blink::WebPresentationAvailabilityCallbacks* callbacks) override; 97 std::unique_ptr<blink::WebPresentationAvailabilityCallbacks> callbacks)
98 override;
96 void startListening(blink::WebPresentationAvailabilityObserver*) override; 99 void startListening(blink::WebPresentationAvailabilityObserver*) override;
97 void stopListening(blink::WebPresentationAvailabilityObserver*) override; 100 void stopListening(blink::WebPresentationAvailabilityObserver*) override;
98 void setDefaultPresentationUrls( 101 void setDefaultPresentationUrls(
99 const blink::WebVector<blink::WebURL>& presentationUrls) override; 102 const blink::WebVector<blink::WebURL>& presentationUrls) override;
100 103
101 // RenderFrameObserver implementation. 104 // RenderFrameObserver implementation.
102 void DidCommitProvisionalLoad( 105 void DidCommitProvisionalLoad(
103 bool is_new_navigation, 106 bool is_new_navigation,
104 bool is_same_page_navigation) override; 107 bool is_same_page_navigation) override;
105 void OnDestruct() override; 108 void OnDestruct() override;
106 109
107 // blink::mojom::PresentationServiceClient 110 // blink::mojom::PresentationServiceClient
108 void OnScreenAvailabilityNotSupported(const GURL& url) override; 111 void OnScreenAvailabilityNotSupported(const GURL& url) override;
109 void OnScreenAvailabilityUpdated(const GURL& url, bool available) override; 112 void OnScreenAvailabilityUpdated(const GURL& url, bool available) override;
110 void OnConnectionStateChanged( 113 void OnConnectionStateChanged(
111 blink::mojom::PresentationSessionInfoPtr connection, 114 blink::mojom::PresentationSessionInfoPtr connection,
112 blink::mojom::PresentationConnectionState state) override; 115 blink::mojom::PresentationConnectionState state) override;
113 void OnConnectionClosed( 116 void OnConnectionClosed(
114 blink::mojom::PresentationSessionInfoPtr connection, 117 blink::mojom::PresentationSessionInfoPtr connection,
115 blink::mojom::PresentationConnectionCloseReason reason, 118 blink::mojom::PresentationConnectionCloseReason reason,
116 const std::string& message) override; 119 const std::string& message) override;
117 void OnSessionMessagesReceived( 120 void OnSessionMessagesReceived(
118 blink::mojom::PresentationSessionInfoPtr session_info, 121 blink::mojom::PresentationSessionInfoPtr session_info,
119 std::vector<blink::mojom::SessionMessagePtr> messages) override; 122 std::vector<blink::mojom::SessionMessagePtr> messages) override;
120 void OnDefaultSessionStarted( 123 void OnDefaultSessionStarted(
121 blink::mojom::PresentationSessionInfoPtr session_info) override; 124 blink::mojom::PresentationSessionInfoPtr session_info) override;
122 125
123 void OnSessionCreated( 126 void OnSessionCreated(
124 blink::WebPresentationConnectionClientCallbacks* callback, 127 std::unique_ptr<blink::WebPresentationConnectionClientCallbacks> callback,
125 blink::mojom::PresentationSessionInfoPtr session_info, 128 blink::mojom::PresentationSessionInfoPtr session_info,
126 blink::mojom::PresentationErrorPtr error); 129 blink::mojom::PresentationErrorPtr error);
127 void OnReceiverConnectionAvailable( 130 void OnReceiverConnectionAvailable(
128 blink::mojom::PresentationSessionInfoPtr) override; 131 blink::mojom::PresentationSessionInfoPtr) override;
129 132
130 // Call to PresentationService to send the message in |request|. 133 // Call to PresentationService to send the message in |request|.
131 // |session_info| and |message| of |reuqest| will be consumed. 134 // |session_info| and |message| of |reuqest| will be consumed.
132 // |HandleSendMessageRequests| will be invoked after the send is attempted. 135 // |HandleSendMessageRequests| will be invoked after the send is attempted.
133 void DoSendMessage(SendMessageRequest* request); 136 void DoSendMessage(SendMessageRequest* request);
134 void HandleSendMessageRequests(bool success); 137 void HandleSendMessageRequests(bool success);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Updates the listening state of availability for |status| and notifies the 181 // Updates the listening state of availability for |status| and notifies the
179 // client. 182 // client.
180 void UpdateListeningState(AvailabilityStatus* status); 183 void UpdateListeningState(AvailabilityStatus* status);
181 184
182 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher); 185 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher);
183 }; 186 };
184 187
185 } // namespace content 188 } // namespace content
186 189
187 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 190 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698