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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 int render_frame_id, | 124 int render_frame_id, |
125 const content::PresentationSessionInfo& session, | 125 const content::PresentationSessionInfo& session, |
126 std::unique_ptr<content::PresentationSessionMessage> message, | 126 std::unique_ptr<content::PresentationSessionMessage> message, |
127 const SendMessageCallback& send_message_cb) override; | 127 const SendMessageCallback& send_message_cb) override; |
128 void ListenForConnectionStateChange( | 128 void ListenForConnectionStateChange( |
129 int render_process_id, | 129 int render_process_id, |
130 int render_frame_id, | 130 int render_frame_id, |
131 const content::PresentationSessionInfo& connection, | 131 const content::PresentationSessionInfo& connection, |
132 const content::PresentationConnectionStateChangedCallback& | 132 const content::PresentationConnectionStateChangedCallback& |
133 state_changed_cb) override; | 133 state_changed_cb) override; |
134 void ConnectToOffscreenPresentation( | 134 void ConnectToPresentation( |
135 int render_process_id, | 135 int render_process_id, |
136 int render_frame_id, | 136 int render_frame_id, |
137 const content::PresentationSessionInfo& session, | 137 const content::PresentationSessionInfo& session, |
138 content::PresentationConnectionPtr connection) override; | 138 content::PresentationConnectionPtr connection) override; |
139 | 139 |
140 // Callback invoked when a default PresentationRequest is started from a | 140 // Callback invoked when a default PresentationRequest is started from a |
141 // browser-initiated dialog. | 141 // browser-initiated dialog. |
142 void OnRouteResponse(const PresentationRequest& request, | 142 void OnRouteResponse(const PresentationRequest& request, |
143 const RouteRequestResult& result); | 143 const RouteRequestResult& result); |
144 | 144 |
(...skipping 28 matching lines...) Expand all Loading... |
173 private: | 173 private: |
174 friend class content::WebContentsUserData<PresentationServiceDelegateImpl>; | 174 friend class content::WebContentsUserData<PresentationServiceDelegateImpl>; |
175 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 175 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
176 DelegateObservers); | 176 DelegateObservers); |
177 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 177 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
178 SetDefaultPresentationUrl); | 178 SetDefaultPresentationUrl); |
179 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 179 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
180 DefaultPresentationRequestObserver); | 180 DefaultPresentationRequestObserver); |
181 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 181 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
182 DefaultPresentationUrlCallback); | 182 DefaultPresentationUrlCallback); |
| 183 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
| 184 ConnectToPresentation); |
183 | 185 |
184 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); | 186 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); |
185 | 187 |
186 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does | 188 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does |
187 // not have a persentation URL, returns the tab mirroring MediaSource. | 189 // not have a persentation URL, returns the tab mirroring MediaSource. |
188 MediaSource GetMediaSourceFromListener( | 190 MediaSource GetMediaSourceFromListener( |
189 content::PresentationScreenAvailabilityListener* listener); | 191 content::PresentationScreenAvailabilityListener* listener); |
190 | 192 |
191 void OnJoinRouteResponse( | 193 void OnJoinRouteResponse( |
192 int render_process_id, | 194 int render_process_id, |
(...skipping 19 matching lines...) Expand all Loading... |
212 std::unique_ptr<PresentationFrameManager> frame_manager_; | 214 std::unique_ptr<PresentationFrameManager> frame_manager_; |
213 | 215 |
214 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 216 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
215 | 217 |
216 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 218 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
217 }; | 219 }; |
218 | 220 |
219 } // namespace media_router | 221 } // namespace media_router |
220 | 222 |
221 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 223 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
OLD | NEW |