| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 | 526 |
| 527 screen_availability_listeners_.clear(); | 527 screen_availability_listeners_.clear(); |
| 528 | 528 |
| 529 start_session_request_id_ = kInvalidRequestSessionId; | 529 start_session_request_id_ = kInvalidRequestSessionId; |
| 530 pending_start_session_cb_.reset(); | 530 pending_start_session_cb_.reset(); |
| 531 | 531 |
| 532 pending_join_session_cbs_.clear(); | 532 pending_join_session_cbs_.clear(); |
| 533 | 533 |
| 534 if (on_connection_messages_callback_.get()) { | 534 if (on_connection_messages_callback_.get()) { |
| 535 on_connection_messages_callback_->Run( | 535 on_connection_messages_callback_->Run( |
| 536 mojo::Array<blink::mojom::ConnectionMessagePtr>()); | 536 std::vector<blink::mojom::ConnectionMessagePtr>()); |
| 537 on_connection_messages_callback_.reset(); | 537 on_connection_messages_callback_.reset(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 if (send_message_callback_) { | 540 if (send_message_callback_) { |
| 541 // Run the callback with false, indicating the renderer to stop sending | 541 // Run the callback with false, indicating the renderer to stop sending |
| 542 // the requests and invalidate all pending requests. | 542 // the requests and invalidate all pending requests. |
| 543 send_message_callback_->Run(false); | 543 send_message_callback_->Run(false); |
| 544 send_message_callback_.reset(); | 544 send_message_callback_.reset(); |
| 545 } | 545 } |
| 546 } | 546 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 599 |
| 600 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( | 600 void PresentationServiceImpl::NewSessionCallbackWrapper::Run( |
| 601 blink::mojom::PresentationSessionInfoPtr session, | 601 blink::mojom::PresentationSessionInfoPtr session, |
| 602 blink::mojom::PresentationErrorPtr error) { | 602 blink::mojom::PresentationErrorPtr error) { |
| 603 DCHECK(!callback_.is_null()); | 603 DCHECK(!callback_.is_null()); |
| 604 callback_.Run(std::move(session), std::move(error)); | 604 callback_.Run(std::move(session), std::move(error)); |
| 605 callback_.Reset(); | 605 callback_.Reset(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace content | 608 } // namespace content |
| OLD | NEW |