| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 int render_frame_id, | 111 int render_frame_id, |
| 112 const std::string& presentation_id) override; | 112 const std::string& presentation_id) override; |
| 113 void Terminate(int render_process_id, | 113 void Terminate(int render_process_id, |
| 114 int render_frame_id, | 114 int render_frame_id, |
| 115 const std::string& presentation_id) override; | 115 const std::string& presentation_id) override; |
| 116 void ListenForSessionMessages( | 116 void ListenForSessionMessages( |
| 117 int render_process_id, | 117 int render_process_id, |
| 118 int render_frame_id, | 118 int render_frame_id, |
| 119 const content::PresentationSessionInfo& session, | 119 const content::PresentationSessionInfo& session, |
| 120 const content::PresentationSessionMessageCallback& message_cb) override; | 120 const content::PresentationSessionMessageCallback& message_cb) override; |
| 121 void SendMessage(int render_process_id, | 121 void SendMessage( |
| 122 int render_frame_id, | 122 int render_process_id, |
| 123 const content::PresentationSessionInfo& session, | 123 int render_frame_id, |
| 124 std::unique_ptr<content::PresentationSessionMessage> message, | 124 const content::PresentationSessionInfo& session, |
| 125 const SendMessageCallback& send_message_cb) override; | 125 std::unique_ptr<content::PresentationSessionMessage> message, |
| 126 const content::SendMessageCallback& send_message_cb) override; |
| 126 void ListenForConnectionStateChange( | 127 void ListenForConnectionStateChange( |
| 127 int render_process_id, | 128 int render_process_id, |
| 128 int render_frame_id, | 129 int render_frame_id, |
| 129 const content::PresentationSessionInfo& connection, | 130 const content::PresentationSessionInfo& connection, |
| 130 const content::PresentationConnectionStateChangedCallback& | 131 const content::PresentationConnectionStateChangedCallback& |
| 131 state_changed_cb) override; | 132 state_changed_cb) override; |
| 133 std::vector<content::PresentationSessionInfo> GetReceiverConnections( |
| 134 int render_process_id, |
| 135 int render_frame_id, |
| 136 const content::PresentationSessionStartedCallback& callback) override; |
| 132 | 137 |
| 133 // Callback invoked when a default PresentationRequest is started from a | 138 // Callback invoked when a default PresentationRequest is started from a |
| 134 // browser-initiated dialog. | 139 // browser-initiated dialog. |
| 135 void OnRouteResponse(const PresentationRequest& request, | 140 void OnRouteResponse(const PresentationRequest& request, |
| 136 const RouteRequestResult& result); | 141 const RouteRequestResult& result); |
| 137 | 142 |
| 138 // Adds / removes an observer for listening to default PresentationRequest | 143 // Adds / removes an observer for listening to default PresentationRequest |
| 139 // changes. This class does not own |observer|. When |observer| is about to | 144 // changes. This class does not own |observer|. When |observer| is about to |
| 140 // be destroyed, |RemoveDefaultPresentationRequestObserver| must be called. | 145 // be destroyed, |RemoveDefaultPresentationRequestObserver| must be called. |
| 141 void AddDefaultPresentationRequestObserver( | 146 void AddDefaultPresentationRequestObserver( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 const content::PresentationSessionInfo& session, | 192 const content::PresentationSessionInfo& session, |
| 188 const content::PresentationSessionStartedCallback& success_cb, | 193 const content::PresentationSessionStartedCallback& success_cb, |
| 189 const content::PresentationSessionErrorCallback& error_cb, | 194 const content::PresentationSessionErrorCallback& error_cb, |
| 190 const RouteRequestResult& result); | 195 const RouteRequestResult& result); |
| 191 | 196 |
| 192 void OnStartSessionSucceeded( | 197 void OnStartSessionSucceeded( |
| 193 int render_process_id, | 198 int render_process_id, |
| 194 int render_frame_id, | 199 int render_frame_id, |
| 195 const content::PresentationSessionStartedCallback& success_cb, | 200 const content::PresentationSessionStartedCallback& success_cb, |
| 196 const content::PresentationSessionInfo& new_session, | 201 const content::PresentationSessionInfo& new_session, |
| 197 const MediaRoute::Id& route_id); | 202 const MediaRoute& route); |
| 198 | 203 |
| 199 // References to the WebContents that owns this instance, and associated | 204 // References to the WebContents that owns this instance, and associated |
| 200 // browser profile's MediaRouter instance. | 205 // browser profile's MediaRouter instance. |
| 201 content::WebContents* const web_contents_; | 206 content::WebContents* const web_contents_; |
| 202 MediaRouter* router_; | 207 MediaRouter* router_; |
| 203 | 208 |
| 204 std::unique_ptr<PresentationFrameManager> frame_manager_; | 209 std::unique_ptr<PresentationFrameManager> frame_manager_; |
| 205 | 210 |
| 206 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 211 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
| 207 | 212 |
| 208 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 213 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
| 209 }; | 214 }; |
| 210 | 215 |
| 211 } // namespace media_router | 216 } // namespace media_router |
| 212 | 217 |
| 213 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 218 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| OLD | NEW |