OLD | NEW |
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 CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int render_frame_id, | 126 int render_frame_id, |
127 const content::PresentationSessionInfo& session, | 127 const content::PresentationSessionInfo& session, |
128 std::unique_ptr<content::PresentationConnectionMessage> message, | 128 std::unique_ptr<content::PresentationConnectionMessage> message, |
129 const SendMessageCallback& send_message_cb) override; | 129 const SendMessageCallback& send_message_cb) override; |
130 void ListenForConnectionStateChange( | 130 void ListenForConnectionStateChange( |
131 int render_process_id, | 131 int render_process_id, |
132 int render_frame_id, | 132 int render_frame_id, |
133 const content::PresentationSessionInfo& connection, | 133 const content::PresentationSessionInfo& connection, |
134 const content::PresentationConnectionStateChangedCallback& | 134 const content::PresentationConnectionStateChangedCallback& |
135 state_changed_cb) override; | 135 state_changed_cb) override; |
136 void ConnectToOffscreenPresentation( | 136 void ConnectToPresentation( |
137 int render_process_id, | 137 int render_process_id, |
138 int render_frame_id, | 138 int render_frame_id, |
139 const content::PresentationSessionInfo& session, | 139 const content::PresentationSessionInfo& session, |
140 content::PresentationConnectionPtr controller_connection_ptr, | 140 content::PresentationConnectionPtr controller_connection_ptr, |
141 content::PresentationConnectionRequest receiver_connection_request) | 141 content::PresentationConnectionRequest receiver_connection_request) |
142 override; | 142 override; |
143 | 143 |
144 // Callback invoked when a default PresentationRequest is started from a | 144 // Callback invoked when a default PresentationRequest is started from a |
145 // browser-initiated dialog. | 145 // browser-initiated dialog. |
146 void OnRouteResponse(const PresentationRequest& request, | 146 void OnRouteResponse(const PresentationRequest& request, |
(...skipping 30 matching lines...) Expand all Loading... |
177 private: | 177 private: |
178 friend class content::WebContentsUserData<PresentationServiceDelegateImpl>; | 178 friend class content::WebContentsUserData<PresentationServiceDelegateImpl>; |
179 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 179 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
180 DelegateObservers); | 180 DelegateObservers); |
181 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 181 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
182 SetDefaultPresentationUrl); | 182 SetDefaultPresentationUrl); |
183 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 183 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
184 DefaultPresentationRequestObserver); | 184 DefaultPresentationRequestObserver); |
185 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 185 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
186 DefaultPresentationUrlCallback); | 186 DefaultPresentationUrlCallback); |
| 187 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
| 188 ConnectToPresentation); |
187 | 189 |
188 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); | 190 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); |
189 | 191 |
190 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does | 192 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does |
191 // not have a persentation URL, returns the tab mirroring MediaSource. | 193 // not have a persentation URL, returns the tab mirroring MediaSource. |
192 MediaSource GetMediaSourceFromListener( | 194 MediaSource GetMediaSourceFromListener( |
193 content::PresentationScreenAvailabilityListener* listener); | 195 content::PresentationScreenAvailabilityListener* listener); |
194 | 196 |
195 void OnJoinRouteResponse( | 197 void OnJoinRouteResponse( |
196 int render_process_id, | 198 int render_process_id, |
(...skipping 25 matching lines...) Expand all Loading... |
222 PresentationServiceDelegateObservers observers_; | 224 PresentationServiceDelegateObservers observers_; |
223 | 225 |
224 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 226 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
225 | 227 |
226 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 228 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
227 }; | 229 }; |
228 | 230 |
229 } // namespace media_router | 231 } // namespace media_router |
230 | 232 |
231 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 233 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
OLD | NEW |