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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const std::vector<GURL>& presentation_urls, | 108 const std::vector<GURL>& presentation_urls, |
109 const std::string& presentation_id, | 109 const std::string& presentation_id, |
110 const content::PresentationConnectionCallback& success_cb, | 110 const content::PresentationConnectionCallback& success_cb, |
111 const content::PresentationConnectionErrorCallback& error_cb) override; | 111 const content::PresentationConnectionErrorCallback& error_cb) override; |
112 void CloseConnection(int render_process_id, | 112 void CloseConnection(int render_process_id, |
113 int render_frame_id, | 113 int render_frame_id, |
114 const std::string& presentation_id) override; | 114 const std::string& presentation_id) override; |
115 void Terminate(int render_process_id, | 115 void Terminate(int render_process_id, |
116 int render_frame_id, | 116 int render_frame_id, |
117 const std::string& presentation_id) override; | 117 const std::string& presentation_id) override; |
118 void ListenForConnectionMessages( | |
119 int render_process_id, | |
120 int render_frame_id, | |
121 const content::PresentationInfo& presentation_info, | |
122 const content::PresentationConnectionMessageCallback& message_cb) | |
123 override; | |
124 void SendMessage(int render_process_id, | 118 void SendMessage(int render_process_id, |
125 int render_frame_id, | 119 int render_frame_id, |
126 const content::PresentationInfo& presentation_info, | 120 const content::PresentationInfo& presentation_info, |
127 content::PresentationConnectionMessage message, | 121 content::PresentationConnectionMessage message, |
128 SendMessageCallback send_message_cb) override; | 122 SendMessageCallback send_message_cb) override; |
129 void ListenForConnectionStateChange( | 123 void ListenForConnectionStateChange( |
130 int render_process_id, | 124 int render_process_id, |
131 int render_frame_id, | 125 int render_frame_id, |
132 const content::PresentationInfo& connection, | 126 const content::PresentationInfo& connection, |
133 const content::PresentationConnectionStateChangedCallback& | 127 const content::PresentationConnectionStateChangedCallback& |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 DelegateObservers); | 173 DelegateObservers); |
180 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 174 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
181 SetDefaultPresentationUrl); | 175 SetDefaultPresentationUrl); |
182 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 176 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
183 DefaultPresentationRequestObserver); | 177 DefaultPresentationRequestObserver); |
184 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 178 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
185 DefaultPresentationUrlCallback); | 179 DefaultPresentationUrlCallback); |
186 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 180 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
187 TestCloseConnectionForOffscreenPresentation); | 181 TestCloseConnectionForOffscreenPresentation); |
188 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, | 182 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
| 183 ConnectToOffscreenPresentation); |
| 184 FRIEND_TEST_ALL_PREFIXES(PresentationServiceDelegateImplTest, |
189 ConnectToPresentation); | 185 ConnectToPresentation); |
190 | 186 |
191 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); | 187 explicit PresentationServiceDelegateImpl(content::WebContents* web_contents); |
192 | 188 |
193 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does | 189 // Returns |listener|'s presentation URL as a MediaSource. If |listener| does |
194 // not have a persentation URL, returns the tab mirroring MediaSource. | 190 // not have a persentation URL, returns the tab mirroring MediaSource. |
195 MediaSource GetMediaSourceFromListener( | 191 MediaSource GetMediaSourceFromListener( |
196 content::PresentationScreenAvailabilityListener* listener); | 192 content::PresentationScreenAvailabilityListener* listener); |
197 | 193 |
198 void OnJoinRouteResponse( | 194 void OnJoinRouteResponse( |
(...skipping 26 matching lines...) Expand all Loading... |
225 PresentationServiceDelegateObservers observers_; | 221 PresentationServiceDelegateObservers observers_; |
226 | 222 |
227 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 223 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
228 | 224 |
229 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 225 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
230 }; | 226 }; |
231 | 227 |
232 } // namespace media_router | 228 } // namespace media_router |
233 | 229 |
234 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 230 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
OLD | NEW |