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 ConnectToPresentation( | 136 void ConnectToOffscreenPresentation( |
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); | |
189 | 187 |
190 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); | 188 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); |
191 | 189 |
192 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does | 190 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does |
193 // not have a persentation URL, returns the tab mirroring MediaSource. | 191 // not have a persentation URL, returns the tab mirroring MediaSource. |
194 MediaSource GetMediaSourceFromListener( | 192 MediaSource GetMediaSourceFromListener( |
195 content::PresentationScreenAvailabilityListener* listener); | 193 content::PresentationScreenAvailabilityListener* listener); |
196 | 194 |
197 void OnJoinRouteResponse( | 195 void OnJoinRouteResponse( |
198 int render_process_id, | 196 int render_process_id, |
(...skipping 25 matching lines...) Expand all Loading... |
224 PresentationServiceDelegateObservers observers_; | 222 PresentationServiceDelegateObservers observers_; |
225 | 223 |
226 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 224 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
227 | 225 |
228 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 226 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
229 }; | 227 }; |
230 | 228 |
231 } // namespace media_router | 229 } // namespace media_router |
232 | 230 |
233 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 231 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
OLD | NEW |