| 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/browser/presentation/presentation_service_impl.h" | 5 #include "content/browser/presentation/presentation_service_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 519 |
| 520 client_->OnSessionMessagesReceived( | 520 client_->OnSessionMessagesReceived( |
| 521 blink::mojom::PresentationSessionInfo::From(session), | 521 blink::mojom::PresentationSessionInfo::From(session), |
| 522 std::move(mojo_messages)); | 522 std::move(mojo_messages)); |
| 523 } | 523 } |
| 524 | 524 |
| 525 void PresentationServiceImpl::OnReceiverConnectionAvailable( | 525 void PresentationServiceImpl::OnReceiverConnectionAvailable( |
| 526 const content::PresentationSessionInfo& session_info, | 526 const content::PresentationSessionInfo& session_info, |
| 527 PresentationConnectionPtr&& controller) { | 527 PresentationConnectionPtr&& controller) { |
| 528 DVLOG(2) << "PresentationServiceImpl::OnReceiverConnectionAvailable"; | 528 DVLOG(2) << "PresentationServiceImpl::OnReceiverConnectionAvailable"; |
| 529 |
| 530 client_->OnReceiverConnectionAvailable( |
| 531 blink::mojom::PresentationSessionInfo::From(session_info), |
| 532 std::move(controller)); |
| 529 } | 533 } |
| 530 | 534 |
| 531 void PresentationServiceImpl::DidNavigateAnyFrame( | 535 void PresentationServiceImpl::DidNavigateAnyFrame( |
| 532 content::RenderFrameHost* render_frame_host, | 536 content::RenderFrameHost* render_frame_host, |
| 533 const content::LoadCommittedDetails& details, | 537 const content::LoadCommittedDetails& details, |
| 534 const content::FrameNavigateParams& params) { | 538 const content::FrameNavigateParams& params) { |
| 535 DVLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame"; | 539 DVLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame"; |
| 536 if (!FrameMatches(render_frame_host)) | 540 if (!FrameMatches(render_frame_host)) |
| 537 return; | 541 return; |
| 538 | 542 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 | 659 |
| 656 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( | 660 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( |
| 657 blink::mojom::PresentationSessionInfoPtr session, | 661 blink::mojom::PresentationSessionInfoPtr session, |
| 658 blink::mojom::PresentationErrorPtr error) { | 662 blink::mojom::PresentationErrorPtr error) { |
| 659 DCHECK(!callback_.is_null()); | 663 DCHECK(!callback_.is_null()); |
| 660 callback_.Run(std::move(session), std::move(error)); | 664 callback_.Run(std::move(session), std::move(error)); |
| 661 callback_.Reset(); | 665 callback_.Reset(); |
| 662 } | 666 } |
| 663 | 667 |
| 664 } // namespace content | 668 } // namespace content |
| OLD | NEW |