| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_OFFSCREEN_PRESENTATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_OFFSCREEN_PRESENTATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_OFFSCREEN_PRESENTATION_MANAGER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_OFFSCREEN_PRESENTATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Invoked on receiver's PresentationServiceImpl when controller connection is | 52 // Invoked on receiver's PresentationServiceImpl when controller connection is |
| 53 // established. | 53 // established. |
| 54 // | 54 // |
| 55 // |presentation_receiver_client_|: blink::mojom::PresentationServiceClienPtr | 55 // |presentation_receiver_client_|: blink::mojom::PresentationServiceClienPtr |
| 56 // for the presentation receiver. | 56 // for the presentation receiver. |
| 57 // |controller_connection_ptr|: blink::mojom::PresentationConnectionPtr for | 57 // |controller_connection_ptr|: blink::mojom::PresentationConnectionPtr for |
| 58 // blink::PresentationConnection object in controlling frame's render process. | 58 // blink::PresentationConnection object in controlling frame's render process. |
| 59 // |receiver_connection_request|: Mojo InterfaceRequest to be bind to | 59 // |receiver_connection_request|: Mojo InterfaceRequest to be bind to |
| 60 // blink::PresentationConnection object in receiver frame's render process. | 60 // blink::PresentationConnection object in receiver frame's render process. |
| 61 // void PresentationServiceImpl::OnReceiverConnectionAvailable( | 61 // void PresentationServiceImpl::OnReceiverConnectionAvailable( |
| 62 // const content::PresentationSessionInfo& session, | 62 // const content::PresentationInfo& presentation_info, |
| 63 // PresentationConnectionPtr controller_connection_ptr, | 63 // PresentationConnectionPtr controller_connection_ptr, |
| 64 // PresentationConnectionRequest receiver_connection_request) { | 64 // PresentationConnectionRequest receiver_connection_request) { |
| 65 // presentation_receiver_client_->OnReceiverConnectionAvailable( | 65 // presentation_receiver_client_->OnReceiverConnectionAvailable( |
| 66 // blink::mojom::PresentationSessionInfo::From(session_info), | 66 // blink::mojom::PresentationInfo::From(presentation_info), |
| 67 // std::move(controller_connection_ptr), | 67 // std::move(controller_connection_ptr), |
| 68 // std::move(receiver_connection_request)); | 68 // std::move(receiver_connection_request)); |
| 69 // } | 69 // } |
| 70 // | 70 // |
| 71 // Send message from controlling/receiver frame to receiver/controlling frame: | 71 // Send message from controlling/receiver frame to receiver/controlling frame: |
| 72 // | 72 // |
| 73 // |target_connection_|: member variable of | 73 // |target_connection_|: member variable of |
| 74 // blink::mojom::PresentationConnectionPtr type, | 74 // blink::mojom::PresentationConnectionPtr type, |
| 75 // refering to remote PresentationConnectionProxy | 75 // refering to remote PresentationConnectionProxy |
| 76 // object on receiver/controlling frame. | 76 // object on receiver/controlling frame. |
| 77 // |message|: Text message to be sent. | 77 // |message|: Text message to be sent. |
| 78 // PresentationConnctionPtr::SendString( | 78 // PresentationConnctionPtr::SendString( |
| 79 // const blink::WebString& message) { | 79 // const blink::WebString& message) { |
| 80 // target_connection_->OnSessionMessageReceived(std::move(session_message)); | 80 // target_connection_->OnConnectionMessageReceived( |
| 81 // std::move(connection_message)); |
| 81 // } | 82 // } |
| 82 // | 83 // |
| 83 // A controller or receiver leaves the offscreen presentation (e.g., due to | 84 // A controller or receiver leaves the offscreen presentation (e.g., due to |
| 84 // navigation) by unregistering themselves from OffscreenPresentation object. | 85 // navigation) by unregistering themselves from OffscreenPresentation object. |
| 85 // | 86 // |
| 86 // When the receiver is no longer associated with an offscreen presentation, it | 87 // When the receiver is no longer associated with an offscreen presentation, it |
| 87 // shall unregister itself with OffscreenPresentationManager. Unregistration | 88 // shall unregister itself with OffscreenPresentationManager. Unregistration |
| 88 // will prevent additional controllers from establishing a connection with the | 89 // will prevent additional controllers from establishing a connection with the |
| 89 // receiver: | 90 // receiver: |
| 90 // | 91 // |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 OffscreenPresentationMap offscreen_presentations_; | 244 OffscreenPresentationMap offscreen_presentations_; |
| 244 | 245 |
| 245 base::ThreadChecker thread_checker_; | 246 base::ThreadChecker thread_checker_; |
| 246 | 247 |
| 247 DISALLOW_COPY_AND_ASSIGN(OffscreenPresentationManager); | 248 DISALLOW_COPY_AND_ASSIGN(OffscreenPresentationManager); |
| 248 }; | 249 }; |
| 249 | 250 |
| 250 } // namespace media_router | 251 } // namespace media_router |
| 251 | 252 |
| 252 #endif // CHROME_BROWSER_MEDIA_ROUTER_OFFSCREEN_PRESENTATION_MANAGER_H_ | 253 #endif // CHROME_BROWSER_MEDIA_ROUTER_OFFSCREEN_PRESENTATION_MANAGER_H_ |
| OLD | NEW |