Index: chrome/browser/media/router/presentation_service_delegate_impl.cc |
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
index ebe434d4e8e8d01fd6607d8d7a32a5e352b74e62..30b1c8a7766b5c88d4aa6a196001e9f3726902ca 100644 |
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc |
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
@@ -327,6 +327,15 @@ void PresentationFrameManager::SetMediaRouterForTest(MediaRouter* router) { |
router_ = router; |
} |
+PresentationServiceDelegateImpl* |
+PresentationServiceDelegateImpl::GetOrCreateForWebContents( |
+ content::WebContents* web_contents) { |
+ DCHECK(web_contents); |
+ // CreateForWebContents does nothing if the delegate instance already exists. |
+ PresentationServiceDelegateImpl::CreateForWebContents(web_contents); |
+ return PresentationServiceDelegateImpl::FromWebContents(web_contents); |
+} |
+ |
PresentationServiceDelegateImpl::PresentationServiceDelegateImpl( |
content::WebContents* web_contents) |
: web_contents_(web_contents), |