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 #include "content/renderer/presentation/presentation_dispatcher.h" | 5 #include "content/renderer/presentation/presentation_dispatcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 blink::mojom::PresentationConnectionPtr controller_connection_ptr, | 570 blink::mojom::PresentationConnectionPtr controller_connection_ptr, |
571 blink::mojom::PresentationConnectionRequest receiver_connection_request) { | 571 blink::mojom::PresentationConnectionRequest receiver_connection_request) { |
572 DCHECK(receiver_); | 572 DCHECK(receiver_); |
573 | 573 |
574 // Bind receiver_connection_proxy with PresentationConnection in receiver | 574 // Bind receiver_connection_proxy with PresentationConnection in receiver |
575 // page. | 575 // page. |
576 auto* connection = | 576 auto* connection = |
577 receiver_->OnReceiverConnectionAvailable(blink::WebPresentationInfo( | 577 receiver_->OnReceiverConnectionAvailable(blink::WebPresentationInfo( |
578 presentation_info.presentation_url, | 578 presentation_info.presentation_url, |
579 blink::WebString::FromUTF8(presentation_info.presentation_id))); | 579 blink::WebString::FromUTF8(presentation_info.presentation_id))); |
580 auto* receiver_connection_proxy = new ReceiverConnectionProxy(connection); | 580 auto* receiver_connection_proxy = |
| 581 new ReceiverConnectionProxy(connection, receiver_); |
581 connection->BindProxy(base::WrapUnique(receiver_connection_proxy)); | 582 connection->BindProxy(base::WrapUnique(receiver_connection_proxy)); |
582 | 583 |
583 receiver_connection_proxy->Bind(std::move(receiver_connection_request)); | 584 receiver_connection_proxy->Bind(std::move(receiver_connection_request)); |
584 receiver_connection_proxy->BindControllerConnection( | 585 receiver_connection_proxy->BindControllerConnection( |
585 std::move(controller_connection_ptr)); | 586 std::move(controller_connection_ptr)); |
586 } | 587 } |
587 | 588 |
588 void PresentationDispatcher::OnConnectionStateChanged( | 589 void PresentationDispatcher::OnConnectionStateChanged( |
589 const PresentationInfo& presentation_info, | 590 const PresentationInfo& presentation_info, |
590 PresentationConnectionState state) { | 591 PresentationConnectionState state) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 796 |
796 PresentationDispatcher::ListeningStatus::ListeningStatus( | 797 PresentationDispatcher::ListeningStatus::ListeningStatus( |
797 const GURL& availability_url) | 798 const GURL& availability_url) |
798 : url(availability_url), | 799 : url(availability_url), |
799 last_known_availability(ScreenAvailability::UNKNOWN), | 800 last_known_availability(ScreenAvailability::UNKNOWN), |
800 listening_state(ListeningState::INACTIVE) {} | 801 listening_state(ListeningState::INACTIVE) {} |
801 | 802 |
802 PresentationDispatcher::ListeningStatus::~ListeningStatus() {} | 803 PresentationDispatcher::ListeningStatus::~ListeningStatus() {} |
803 | 804 |
804 } // namespace content | 805 } // namespace content |
OLD | NEW |