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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 void PresentationServiceImpl::SetPresentationConnection( | 466 void PresentationServiceImpl::SetPresentationConnection( |
467 const PresentationSessionInfo& session_info, | 467 const PresentationSessionInfo& session_info, |
468 blink::mojom::PresentationConnectionPtr controller_connection_ptr, | 468 blink::mojom::PresentationConnectionPtr controller_connection_ptr, |
469 blink::mojom::PresentationConnectionRequest receiver_connection_request) { | 469 blink::mojom::PresentationConnectionRequest receiver_connection_request) { |
470 DVLOG(2) << "SetPresentationConnection"; | 470 DVLOG(2) << "SetPresentationConnection"; |
471 | 471 |
472 if (!controller_delegate_) | 472 if (!controller_delegate_) |
473 return; | 473 return; |
474 | 474 |
475 controller_delegate_->ConnectToOffscreenPresentation( | 475 controller_delegate_->ConnectToPresentation( |
476 render_process_id_, render_frame_id_, session_info, | 476 render_process_id_, render_frame_id_, session_info, |
477 std::move(controller_connection_ptr), | 477 std::move(controller_connection_ptr), |
478 std::move(receiver_connection_request)); | 478 std::move(receiver_connection_request)); |
479 } | 479 } |
480 | 480 |
481 void PresentationServiceImpl::OnConnectionMessages( | 481 void PresentationServiceImpl::OnConnectionMessages( |
482 const PresentationSessionInfo& session_info, | 482 const PresentationSessionInfo& session_info, |
483 const std::vector<std::unique_ptr<PresentationConnectionMessage>>& messages, | 483 const std::vector<std::unique_ptr<PresentationConnectionMessage>>& messages, |
484 bool pass_ownership) { | 484 bool pass_ownership) { |
485 DCHECK(client_); | 485 DCHECK(client_); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 | 634 |
635 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( | 635 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( |
636 const base::Optional<PresentationSessionInfo>& session_info, | 636 const base::Optional<PresentationSessionInfo>& session_info, |
637 const base::Optional<PresentationError>& error) { | 637 const base::Optional<PresentationError>& error) { |
638 DCHECK(!callback_.is_null()); | 638 DCHECK(!callback_.is_null()); |
639 callback_.Run(session_info, error); | 639 callback_.Run(session_info, error); |
640 callback_.Reset(); | 640 callback_.Reset(); |
641 } | 641 } |
642 | 642 |
643 } // namespace content | 643 } // namespace content |
OLD | NEW |