| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 std::string PresentationServiceImpl::ScreenAvailabilityListenerImpl | 566 std::string PresentationServiceImpl::ScreenAvailabilityListenerImpl |
| 567 ::GetAvailabilityUrl() const { | 567 ::GetAvailabilityUrl() const { |
| 568 return availability_url_; | 568 return availability_url_; |
| 569 } | 569 } |
| 570 | 570 |
| 571 void PresentationServiceImpl::ScreenAvailabilityListenerImpl | 571 void PresentationServiceImpl::ScreenAvailabilityListenerImpl |
| 572 ::OnScreenAvailabilityChanged(bool available) { | 572 ::OnScreenAvailabilityChanged(bool available) { |
| 573 service_->client_->OnScreenAvailabilityUpdated(availability_url_, available); | 573 service_->client_->OnScreenAvailabilityUpdated(availability_url_, available); |
| 574 } | 574 } |
| 575 | 575 |
| 576 void PresentationServiceImpl::ScreenAvailabilityListenerImpl |
| 577 ::OnScreenAvailabilityNotSupported() { |
| 578 service_->client_->OnScreenAvailabilityNotSupported(availability_url_); |
| 579 } |
| 580 |
| 576 PresentationServiceImpl::NewSessionMojoCallbackWrapper | 581 PresentationServiceImpl::NewSessionMojoCallbackWrapper |
| 577 ::NewSessionMojoCallbackWrapper(const NewSessionMojoCallback& callback) | 582 ::NewSessionMojoCallbackWrapper(const NewSessionMojoCallback& callback) |
| 578 : callback_(callback) { | 583 : callback_(callback) { |
| 579 } | 584 } |
| 580 | 585 |
| 581 PresentationServiceImpl::NewSessionMojoCallbackWrapper | 586 PresentationServiceImpl::NewSessionMojoCallbackWrapper |
| 582 ::~NewSessionMojoCallbackWrapper() { | 587 ::~NewSessionMojoCallbackWrapper() { |
| 583 if (!callback_.is_null()) | 588 if (!callback_.is_null()) |
| 584 InvokeNewSessionMojoCallbackWithError(callback_); | 589 InvokeNewSessionMojoCallbackWithError(callback_); |
| 585 } | 590 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 632 |
| 628 void PresentationServiceImpl::DefaultSessionStartContext::Reset() { | 633 void PresentationServiceImpl::DefaultSessionStartContext::Reset() { |
| 629 ScopedVector<DefaultSessionMojoCallback> callbacks; | 634 ScopedVector<DefaultSessionMojoCallback> callbacks; |
| 630 callbacks.swap(callbacks_); | 635 callbacks.swap(callbacks_); |
| 631 for (const auto& callback : callbacks) | 636 for (const auto& callback : callbacks) |
| 632 callback->Run(presentation::PresentationSessionInfoPtr()); | 637 callback->Run(presentation::PresentationSessionInfoPtr()); |
| 633 session_.reset(); | 638 session_.reset(); |
| 634 } | 639 } |
| 635 | 640 |
| 636 } // namespace content | 641 } // namespace content |
| OLD | NEW |